Hi,
I take the opportunity of a recent thread about axes label to reiterate
a question I posted some time ago:
Is there a way (best would be a default parameters in matplotlibrc) to
automagically plot minor ticks?
I *thought* I knew how to add them manually using e.g.
ax.xaxis.set_minor_locator, but I dont know how to handle them
automatically. E.g. my simplest guest was to use LinearLocator:
x = randn(100)
y = randn(100)
plot(x,y,'bo')
ax = gca()
ax.xaxis.set_minor_locator(LinearLocator())
But these minor ticks wont (necessarily) be coherent with the automatic
major ticks:
L = ax.xaxis.get_major_locator()
l = ax.xaxis.get_minor_locator()
print L()
[-4. -3. -2. -1. 0. 1. 2. 3. 4.]
print l()
[-4. -3.2 -2.4 -1.6 -0.8 0. 0.8 1.6 2.4 3.2 4. ]
(see, it will look like |.......:.|.....:...|...:.....|.:...)
How could I do to have some minor ticks automagically coherent with the
automated major ticks?
Cheers.
--
.~. Yannick COPIN (o:>* Doctus cum libro
/V\ Institut de physique nucleaire de Lyon (IN2P3 - France)
// \\ Tel: (33/0) 472 431 968 AIM: YnCopin ICQ: 236931013
/( )\ http://snovae.in2p3.fr/ycopin/
^`~'^
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users