Ryan,

In my (limited) experience, it's dicey to mix pylab's plotting  
functionality and the OO API.  I guess I'm a little unclear exactly  
what your use case is for this.  It sounds like you're goal is to  
create a library of functions that operate on Figure instances,  
perhaps so you can use them both interactively and as part of a  
wxPython application.

If that's the case, I'd recommend you try using pylab's gcf() and draw 
() to acquire and redraw the current Figure instance from within  
IPython.  You can also save the return value of pylab's figure(),  
which returns a Figure that's already been attached to the  
appropriate renderer.  This way you can use the OO API for plotting  
without having to futz with the drawing machinery directly.

This script might give you some ideas about how to structure your  
code.  It contains several of the MPL examples re-coded as functions  
that accept a Figure instance and use the OO API for plotting.

        http://svn.csrri.iit.edu/mr-software/wxmpl/trunk/demos/plotting.py

Ken

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to