On Mon, Oct 18, 2010 at 8:52 AM, Luis Quesada <l.ques...@4c.ucc.ie> wrote:
> Dear all,
>
> Is there a way of avoiding the overlap between the text of the labels
> and the text of the ticks? This is what I am getting:
>
>
> http://4c.ucc.ie/~lquesada/tmp/surface.pdf<http://4c.ucc.ie/%7Elquesada/tmp/surface.pdf>
>
> Currently I am only doing this:
>
> ax.set_xlabel('Distance',fontsize=16)
> ax.set_ylabel('Size',fontsize=16)
> ax.set_zlabel('Cost',fontsize=16)
>
> Is it also possible to give an orientation to the labels? It would be
> nicer if they are oriented parallel to the axis..
> Thanks in advance for your advice!
> Cheers,
> Luis
>
>
Luis,
This is a problem with matplotlib, even in 2d space. It becomes even more
difficult to deal with in 3d projections. One thing that works in 2d space
is to specify the 'x' or 'y' value of the label. I have never tried this in
3d though, and I don't know what to do for the zlabel. Anyway, try this for
a spin:
ax.set_xlabel('Distance', fontsize=16, y=0.05)
ax.set_ylabel('Size', fontsize=16, x=0.05)
ax.set_zlabel('Cost', fontsize=16)
If it seems to have an effect, then you can tweak the numbers accordingly to
your liking.
As for having the text have a particular rotation orientation, I am not
aware of any feature to be able to properly control that. If we could ever
get an OpenGL backend (one can dream, can't he?), then I can see it being
possible, but not now in our current framework.
Ben Root
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users