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