warsztaty-python-repo/script.py
2025-01-18 16:30:29 +01:00

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()