Guest User

Untitled

a guest
Mar 22nd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
  2. y = [0.32, 0.30, 0.28, 0.26, 0.24, 0.22, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10]
  3. fig = plt.figure()
  4. ax1 = fig.add_subplot(111)
  5. x_major = MultipleLocator(4)
  6. x_minor = MultipleLocator(1)
  7. ax1.xaxis.set_major_locator(x_major)
  8. ax1.xaxis.set_minor_locator(x_minor)
  9. ax1.set_yscale("log")
  10. y_major = LogLocator(base=10)
  11. y_minor = LogLocator(base=10)
  12. ax1.yaxis.set_major_locator(y_major)
  13. ax1.yaxis.set_minor_locator(y_minor)
  14. ax1.plot(x, y)
  15. plt.show()
Add Comment
Please, Sign In to add comment