Advertisement
Guest User

Untitled

a guest
Feb 9th, 2018
1,334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3.  
  4. x = np.arange(4)
  5. y = [1.0, 2.0, 4.0, 6.0]
  6.  
  7. barlist = plt.bar(x, y, edgecolor='white')
  8. barlist[0].set_color('#e57373')
  9. barlist[1].set_color('#ef5350')
  10. barlist[2].set_color('#f44336')
  11. barlist[3].set_color('#e53935')
  12.        
  13. ax = plt.gca()
  14. ax.spines['right'].set_color('none')
  15. ax.spines['top'].set_color('none')
  16. ax.spines['bottom'].set_color('black')
  17. ax.spines['left'].set_color('black')
  18. ax.spines['left'].set_linewidth(4.0)
  19. ax.spines['bottom'].set_linewidth(4.0)
  20.  
  21. plt.xticks(())
  22. plt.yticks(())
  23.  
  24. plt.xlim(-1, 4)
  25. plt.ylim(-0.5, 8)
  26.  
  27. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement