Hi,
I have a very crowded plot with lots of subplots, and tick labels tend to
overlap. I wanted to drop e.g. the 1st and last x-tick labels for each
subplot, doing something like:
ax = P.subplot(1,1,1)
ax.plot([1,2,3,2,1,2,3])
ax.set_xticklabels(['']+
[ lbl.get_text() for lbl in ax.get_xticklabels()[1:-1] ]+
[''])
This works in interactive 'ipython -pylab', but this does not work anymore in
a script: in my script, the tick label returned by ax.get_xticklabels() are
all empty strings:
print [ lbl.get_text() for lbl in ax.get_xticklabels() ]
returns
['', '', '', '', '', '', '']
It seems the tick text strings are filled in only at the very last moment (at
show() time?).
Any help out there?
Cheers,
--
.~. Yannick COPIN (o:>* Doctus cum libro
/V\ Institut de physique nucléaire de Lyon
// \\ Université de Lyon - CNRS-IN2P3
/( )\ AIM: YnCopin ICQ: 236931013
^`~'^ http://snovae.in2p3.fr/ycopin/
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users