On 2013-04-01 13:45:07 +0000, Benjamin Root said:

> 
> On Fri, Mar 29, 2013 at 7:30 PM, Michael Aye 
> <michael....@ucla.edu> wrote:
> Is there a pylab version of ax.plot_surface?
> I am asking because the following does not work when running an ipython
> notebook in pylab mode:
> #0: #create some data ….
> #1: fig = plt.figure()
>       ax = fig.gca(projection='3d')
> #2: surf = ax.plot_surface( …..) # taking the exact command from the examples.
> 
> I have verified that this code only does NOT work when #1 and #2 are
> executed in different notebook cells. When they are combined in the
> same cell, it works.
> As I prefer the flexibility of being able to run everything anywhere, I
> am asking for pylab versions of plot_surface, as I am mostly running
> things in the pylab mode of the notebook.
> 
> Cheers,
> Michael
> 
> 
> The reason this does not work in separate cells is that a figure object 
> gets closed at the end of a ipython cell.  An ax object no longer works 
> when its parent figure is closed.  This is not limited to 3d plots.  I 
> would be surprised to see ax.plot() work if a non-3d axes object was 
> made in a different cell.

Sure, but isn't that just the reason why it doesn't work the OO-way?
That's exactly why I am asking for a pylab version of plot_surface that 
does NOT require to have a 3d axes object available already.


> 
> Ben Root
> 
> ------------------------------------------------------------------------------
> Own the Future-Intel&reg; Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game
> on Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users




------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to