Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. from matplotlib import pyplot as plt
  2.  
  3. dev_x = [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
  4.  
  5. dev_y = [38496, 42000, 46752, 49320, 53200,
  6. 56000, 62316, 64928, 67317, 68748, 73752]
  7. py_dev_y = [45372, 48876, 53850, 57287, 63016,
  8. 65998, 70003, 70000, 71496, 75370, 83640]
  9.  
  10. plt.plot(dev_x,dev_y,color='k',linestyle='--',marker='.',label='All Devs')
  11. plt.plot(dev_x,py_dev_y,'b',marker='o',label='Python Devs')
  12. plt.title('Median Salary (USD) by Age')
  13. plt.xlabel('Age')
  14. plt.ylabel('Salary (USD)')
  15. plt.style.use('fivethirtyeight')
  16. plt.legend()
  17. plt.grid(True)
  18. #plt.savefig('plot.png')
  19. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement