Advertisement
Guest User

Matplotlib Example

a guest
Apr 4th, 2020
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2.  
  3. X = [x * 0.5 for x in range(0, 21)]
  4. Y = [x * x for x in X]
  5.  
  6. plt.figure(figsize=(10, 8))
  7.  
  8. plt.title('Кусок параболы')
  9. plt.grid(True)
  10. plt.xticks(range(11))
  11. plt.yticks(range(0, 101, 10))
  12.  
  13. plt.plot(X, Y, marker='o', color='y', linestyle=':')
  14. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement