Advertisement
AyanUpadhaya

Matplotlib Pyplot Draw Plot

Aug 15th, 2021
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. # matplotlib
  2.  
  3. #print(matplotlib.__version__)
  4.  
  5. #pyplot
  6.  
  7. import matplotlib.pyplot as plt
  8. import numpy as np
  9.  
  10. xpoints = np.array([1,8])
  11. ypoints = np.array([3,300])
  12.  
  13. plt.plot(xpoints,ypoints)
  14.  
  15. plt.show()
  16.  
  17. # ~ By default, the plot() function draws a line from point to point.
  18.  
  19. # ~ Parameter 1 is an array containing the points on the x-axis.
  20.  
  21. # ~ Parameter 2 is an array containing the points on the y-axis.
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement