Roll and offset around viewpoint with Axes3D

As for the roll issue described below :

how hard would it be to implement something similar to

tr = Affine2D().scale(2, 1).rotate_deg(30)

inside mplot3D ? Where should I start ?

All I want basically is define my viewpoint with 6 parameters (elev, azim,
distance, roll, pitch and yaw), and not just 2 (elev,azim). I know it can
be done interactively, but I want(need) to script it.

Any suggestions ?

Fréd

···

On Sun, May 1, 2011 8:26 pm, Frederic Vogt wrote:

Hello,

I am using the scatter function and axes3D. I can define my viewpoint on
my data points using the elev and azim parameters. But I am looking for
more specification of the viewpoint : namely, I want to roll (i.e. rotate
around the view axis) and offset it (i.e. get sideways, not rotate around
my data points).

Is there any way to do it ? At the moment, I am using transformation
matrices applied to my data points to reproduce the roll and offset.
Ultimately, I want to rotate and offset both the data points and axis, but
the transformation matrices only impact the data point.

Hence my question : any way to roll and offset around a viewpoint with
Axes3D ? I don't want to do this interactively, I want to be able to
program it.

Thanks, and cheers !

Fréd

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Fred,

Ideally, it should be possible to redefine mplot3d’s transformations so that this is possible within matplotlib’s current framework… if mplot3d actually used transforms like the rest of matplotlib. Unfortunately, a lot of stuff is hard-coded. You could take a look at the proj3d.py file in matplotlib/lib/mpl_toolkits/mplot3d. The event handling code is in axes3d.py in the same directory. Note that things are a bit of a mess, and if you want to help me out with improving it, I would suggest working off of the master branch on github.

I have also been working towards improving matplotlib’s transforms framework so that it could one day be capable of handling N-D inputs (right now it assumes 1-D). Once the transforms framework gets improved, then I anticipate getting mplot3d updated to use real transforms, which should make your goal a lot easier. But I don’t see that happening for a while now.

So, in the meantime, I would welcome any and all patches to improve the current mplot3d code.

Ben Root

···

On Thu, May 5, 2011 at 6:32 PM, Frederic Vogt <fvogt@…2991…> wrote:

As for the roll issue described below :

how hard would it be to implement something similar to

tr = Affine2D().scale(2, 1).rotate_deg(30)

inside mplot3D ? Where should I start ?

All I want basically is define my viewpoint with 6 parameters (elev, azim,

distance, roll, pitch and yaw), and not just 2 (elev,azim). I know it can

be done interactively, but I want(need) to script it.

Any suggestions ?

Fréd