Advertisement
lalkaed

Plot

Sep 6th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. import codecademylib
  2. from matplotlib import pyplot as plt
  3.  
  4. x = [1, 1, 2, 3, 5, 8, 13, 21]
  5. y1 = [135, 51, 22, 31, 35, 18, 3, 1]
  6. y2 = [.1, 20.21, .2, 2.13, .5, 9.28, .193, .21]
  7. plt.plot(x,y1,color='pink',marker='o')
  8. plt.plot(x,y2,color='gray',marker='o')
  9. plt.title('Two Lines on One Graph')
  10. plt.xlabel('Amazing X-axis')
  11. plt.ylabel('Incredible Y-axis')
  12. plt.legend(['Line of color','Gray Line'],loc=4)
  13. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement