Re: [Matplotlib-users] unclutter the axis

2009-10-13 Thread Jae-Joon Lee
On Mon, Oct 12, 2009 at 11:45 AM, Ernest Adrogué wrote: > hi, > > is there a way to put a label every two o three ticks, > instead of putting it on every tick? I personally think it is best to use major ticks with labels and minor ticks w/o labels. > > the following works but it's a little cumbe

[Matplotlib-users] unclutter the axis

2009-10-12 Thread Ernest Adrogué
hi, is there a way to put a label every two o three ticks, instead of putting it on every tick? the following works but it's a little cumbersome: ax.set_yticklabels([pos % 2 != 0 and '%.2f' % num or '' for pos, num in enumerate(ax.get_yticks())]) cheers, Ernest --