msfz751

Untitled

Oct 18th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. import numpy as np
  2. import nitroplot
  3. from matplotlib.ticker import AutoMinorLocator
  4.  
  5. # example based on
  6. # http://matplotlib.org/examples/pylab_examples/major_minor_demo2.html
  7.  
  8. active_sheet("sine")
  9.  
  10.  
  11. # One can supply an argument to AutoMinorLocator to
  12. # specify a fixed number of minor intervals per major interval, e.g.:
  13. # minorLocator = AutoMinorLocator(2)
  14. # would lead to a single minor tick between major ticks.
  15.  
  16. minorLocator   = AutoMinorLocator()
  17.  
  18.  
  19. t, s = Cell("A1").vertical, Cell("B1").vertical
  20.  
  21. fig, ax = nitroplot.subplots()
  22. nitroplot.plot(t,s)
  23.  
  24. ax.xaxis.set_minor_locator(minorLocator)
  25.  
  26. nitroplot.tick_params(which='both', width=2)
  27. nitroplot.tick_params(which='major', length=7)
  28. nitroplot.tick_params(which='minor', length=4, color='r')
  29.  
  30. nitroplot.graph()
Advertisement
Add Comment
Please, Sign In to add comment