I’m trying to use mplot3d in a Wx based application, and most things seem to
be working fine. The one issue that keeps tripping me up is that the axes
labels are drawn at a weird angle. If I do the same type of plot without
using wx, then this problem goes away. I am completely stumped as to where
to even begin looking to fix this problem, so I would appreciate any
pointers you can give me.
I’ve attached a screenshot showing what I am talking about - a simple plot
where the axes labels look strange.
http://old.nabble.com/file/p30184616/mplot3d.jpg
I can reproduce the weird angle issue, but I can’t seem to find a backend where it doesn’t occur. Could you run “import matplotlib; print matplotlib.get_backend()” to determine which backend you are using when everything looks ok? Also, could you report the output of “matplotlib.version”?
If it happens for all backends then the problem is in mplot3d/axis3d.py. Unfortunately, the code there is a little light on commenting, but i don’t notice any glaring mathematical error off the bat.
Ben Root
That’s actually a really good point and something I didn’t explain well – I didn’t go out of my way to test with other backends, but rather I tried it by recreating the plot independently of my GUI, creating the same plot using pyplot, following the example in scatter3d_demo.py from the sourceforge demos page. If I then import matplotlib and check the backend, I get that it’s TkAgg, but I’m not sure whether that backend is actually being used – is it?
I did just try changing between Wx and WxAgg for the backends, and the positions of the labels definitely move around in weird ways between the two, so I think I’m now even more confused than I was before.
James
···
From: ben.v.root@…287… [mailto:ben.v.root@…287…] On Behalf Of Benjamin Root
On Wed, Nov 10, 2010 at 3:12 PM, unij <jdavidheiser@…3346…> wrote: