18 lines
301 B
Python
18 lines
301 B
Python
import matplotlib.pyplot as plt
|
|
import numpy as np
|
|
|
|
#Data for plotting
|
|
x = np.linspace(-20, 15)
|
|
y = x**4 # y = x^4
|
|
|
|
# Create plot
|
|
plt.plot(x, y, label='y = x^4')
|
|
plt.title('Graph of the function y = x^4')
|
|
plt.xlabel('x')
|
|
plt.ylabel('y')
|
|
plt.legend()
|
|
|
|
# Show visualization
|
|
plt.grid(True)
|
|
plt.show()
|