|
From: Bing <bin...@gm...> - 2008-05-25 03:52:09
|
Hi John, Thanks for the hint. I am able to pass the rect returned by Subplot.get_position(). Bing On Sat, May 24, 2008 at 9:27 PM, John Hunter <jd...@gm...> wrote: > On Sat, May 24, 2008 at 4:08 PM, Bing <bin...@gm...> wrote: > > Hello, > > Could anyone tell me how to use plot3D in a subplot? > > I looked at the examples at > > http://www.scipy.org/Cookbook/Matplotlib/mplot3D > > But seems to me that matplotlib.axes3d.Axes3D can > > be only constructed from a Figure instance but > > not from a Subplot instance. > > You should be able to set the rect keyword argument of the Axes3D > constructor: > > fig=p.figure() > ax = pylab.Axes3D(fig, rect=[0.2, 0.6, 0.7, 0.3]) > > where rect is [left, bottom, width, height] in fractions of the figure 0..1 > > A subplot is just an axes with a rect set so that it lives on a regular > grid. > > Note though that the 3D stuff is experimental, slow, somewhat buggy > and not supported, so we won't be able to help much with real > problems. > > JDH > |