On Tue, Feb 16, 2010 at 2:03 PM, Jae-Joon Lee <lee.j.j...@gmail.com> wrote:
> If what you want is to have more padding for the major tick labels, I
> recommend you to use
>
> rcParams['xtick.major.pad'] = 20
>
> If you don't like to change the global setting, you may set the
> ticklabel padding for an specific axis. Try
>
> for tck in ax.xaxis.get_major_ticks():
>    tck.set_pad(20)
>    tck.label1 = tck._get_text1()
>
> Regards,
>
> -JJ
>

Wow. This is really useful and perhaps, should be placed in a wiki
somewhere.  Is this a common enough task to warrant a method?

   ax.xaxis.repad_ticks(20)

Being unfamiliar with the Tick class, I wouldn't have expected that it
would have been necessary to reassign label1 (after setting the pad
size).

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to