To get rid of the networkx dependency, I just replaced my_plot() with this:

def my_plot(figure):
    figure.clear()
    axes = figure.add_subplot(1,1,1)
    axes.plot([0,1,2],[2,3,4])

and also added "self.panel2.update_display()" in the constructor for
MyFrame, and everything worked fine.  Could it be networkx caching a
reference to a figure or axes that is really the problem?  Can you post the
full stack trace instead of just the last line?



On Wed, Jul 11, 2012 at 12:45 PM, Joshua Koehler <jjkoehl...@gmail.com>wrote:

> Hi all,
>
> I am currently trying to have two panels each with their own figure
> instance so they can have separate plots.
>
> I can successfully update a plot if there is only one panel. As soon as I
> add a second panel, I get the following error when I try to update (replot)
> a plot (Showing last message only):
>
> File
> "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/axes.py",
> line 1374, in _sci
>     "Argument must be an image, collection, or ContourSet in this Axes")
> ValueError: Argument must be an image, collection, or ContourSet in this
> Axes
>
> I looked online first and one site suggested it was because I was using
> matplotlib.Figure instead of pylab.Figure. I switched and the problem still
> occurs. I was curious to see if this problem had to do with how I set up my
> program, not with matplotlib, so I wrote a little test program. The exact
> same problem occurs. I have attached the test program. To see that it does
> work with just one panel comment out lines 39, 41, and 49. When put back
> in, I get the above error message.
>
> Any suggestions as to how to fix this?
>
> Thanks!
>
> Josh
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>


-- 
Daniel Hyams
dhy...@gmail.com
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to