|
From: Benjamin R. <ben...@ou...> - 2011-05-05 23:53:23
|
On Thu, May 5, 2011 at 6:32 PM, Frederic Vogt <fv...@ms...> 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 > > 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 |