Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from matplotlib.pyplot import *
- X = range(1, 8)
- Y = np.array([42586, 5298, 1145, 128, 36, 11, 2])
- axes = gca()
- axes.set_yscale('log')
- bar(X, Y, facecolor='#9999ff', align='center')
- xlabel('X axis')
- ylabel('Y axis')
- # NOT NEEDED xticks(X, X, ha='center')
- for x, y in zip(X, Y):
- text(x, np.exp(0.1 + np.log(y)), '%i' % y, ha='center', va='bottom')
- # NOT NEEDED plot()
- show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement