elena1234

basics plot with Matplotlib

Apr 26th, 2022 (edited)
640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3.  
  4. x = np.arange(1,10)
  5. y = 2 * x
  6.  
  7. plt.plot(x,y)
  8. plt.title('String title')
  9. plt.xlabel('X Axis')
  10. plt.ylabel('Y Axis')
  11. plt.xlim(1,10)
  12. plt.ylim(2,20)
  13. plt.show()
  14.  
Add Comment
Please, Sign In to add comment