Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # major_minor_demo2.py
- import numpy as np
- import nitroplot
- from matplotlib.ticker import AutoMinorLocator
- # example based on
- # http://matplotlib.org/examples/pylab_examples/major_minor_demo2.html
- active_sheet("sine")
- # One can supply an argument to AutoMinorLocator to
- # specify a fixed number of minor intervals per major interval, e.g.:
- # minorLocator = AutoMinorLocator(2)
- # would lead to a single minor tick between major ticks.
- minorLocator = AutoMinorLocator()
- t, s = Cell("A1").vertical, Cell("B1").vertical
- fig, ax = nitroplot.subplots()
- nitroplot.plot(t,s)
- ax.xaxis.set_minor_locator(minorLocator)
- nitroplot.tick_params(which='both', width=2)
- nitroplot.tick_params(which='major', length=7)
- nitroplot.tick_params(which='minor', length=4, color='r')
- nitroplot.graph(
Advertisement
Add Comment
Please, Sign In to add comment