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)
[ 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() ]
['', '', '', '', '', '', '']
It seems the tick text strings are filled in only at the very last moment (at show() time?).
Any help out there?
.~. Yannick COPIN (o:>* Doctus cum libro
/V\ Institut de physique nucléaire de Lyon
// \\ Université de Lyon - CNRS-IN2P3
/( )\ AIM: YnCopin ICQ: 236931013