[Matplotlib-users] v1.1.0 crashes upon exit

2011-11-02 Thread John Jameson
Thanks Ben! 

I just updated my Macports and it brought in v1.1.0 so I will check it out
for easier animation.

In the meantime I notice that with MPL v1.1.0 the program crashes at the end
a most of my old MPL example programs (I use the GTKAgg backend for all of
them). A typical way to end the program is:

gtk.main_quit()

raise SystemExit


and it crashes on the call the ''raise SystemExit". A typical output is

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si
te-packages/matplotlib/backends/backend_gtk.py:552: GtkWarning:
gtk_widget_unrealize: assertion `GTK_IS_WIDGET (widget)' failed

  self.toolbar.destroy()

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si
te-packages/matplotlib/backends/backend_gtk.py:552: GtkWarning:
gtk_widget_is_toplevel: assertion `GTK_IS_WIDGET (widget)' failed

  self.toolbar.destroy()


Any thoughts are appreciated!
thanks again,
john




--
RSA® Conference 2012
Save $700 by Nov 18
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev1___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] image blitted onto an axes is not showing up

2011-11-01 Thread John Jameson
Hi,
I am trying to do an animation in two axes (subplots) and I can get it to
work so-so if I do it the "wrong way" but when I do it the "right way" I
don't see anything in my second subplot.

The first subplot (ax1) shows a bunch of moving line segments ("sticks") and
the second one (ax2) shows a low resolution (pixellated) view of the first
subplot. The latter (ax2) uses imshow() but when I update it through
setarray() and blit it onto the canvas it doesn't show up (although the
sticks in the ax1 show up fine). However, if I insert the line canvas.draw()
after the ax2 blit it works but it makes the ax1 animation very jittery.

Can someone tell me the correct way to do this?  I'm still a tenderfoot in
Matplotlib ;-(

thanks!
John







class Sticks_animator():
x_offset = 0.0 



def __init__(self, n_sticks_tot, n_pixels_horizontal=0,

n_pixels_vertical=0 ):

.
.
.
.
.

   def reset(self):

self.background1 = None

self.background2 = None

self.start = 1



def draw_sticks(self):



if self.start:

self.poly = []

for i in range( self.n_sticks_tot):

x_stick = array([ [self.x1[i], self.y1[i]],

  [self.x2[i], self.y2[i]] ] )



self.poly.append( Polygon( x_stick, animated=True,

   lw=2, fill=False) )
self.ax1.add_patch(self.poly[i])

self.ax1.draw_artist(self.poly[i])


else:

for i in range( self.n_sticks_tot):

x_stick = array([ [self.x1[i], self.y1[i]],

  [self.x2[i], self.y2[i]] ] )

self.poly[i].set_xy(x_stick)

self.ax1.draw_artist(self.poly[i])


def draw_retina(self):

if self.start:

self.img = self.ax2.imshow(self.inten, interpolation='nearest')
else: 

self.img.set_array(self.inten)


def step_it(self):
self.inten, self.n_sticks_tot, self.x1, self.y1, \

   self.x2, self.y2, done = self.stks.Step_it()

# self.stks.Step_it() is finds all the stick coordinates
#   and inten is a NXN array of a pixellated (low res) view

#   of all the sticks



if self.background1 is None:

self.background1 = self.canvas.copy_from_bbox(self.ax1.bbox)

self.canvas.restore_region(self.background1)

self.draw_sticks()

self.canvas.blit(self.ax1.bbox)



if self.add_retina_view:
self.draw_retina()

self.canvas.blit(self.ax2.bbox)

#self.canvas.draw()   IF I UNCOMMENT THIS IT "WORKS"


self.start = 0



if done:
gtk.main_quit()

raise SystemExit

return True



def mainer( self, stks ):
 self.stks = stks 


if isinteractive():

ioff()
def start_anim(event):

gobject.idle_add( self.step_it )

self.canvas.mpl_disconnect(start_anim.cid)


start_anim.cid = self.canvas.mpl_connect('draw_event', start_anim)

plt.show()




--
RSA® Conference 2012
Save $700 by Nov 18
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev1___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] no gdk backend with macports and snow leopard FIXED

2011-06-06 Thread John Jameson
OK, I just found the fix ­ within two minutes of my last email to you (after
spending 6 hours on it)!!
I needed to use the following variant for the macports installation (like I
said, I rather new at the Mac and unix):

sudo port install py26-matplotlib @1.0.1 +gtk2

for the matplotlib installation. it works now, although I still get this
message:
Xlib:  extension "RANDR" missing on display "/tmp/launch-KDlxaE/org.x:0".


thanks,
john


--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] no gdk backend with macports and snow leopard

2011-06-06 Thread John Jameson
I am having the old "no gdk backend" problem with GTKAgg. I am running OS X
10.6 (Snow Leopard), and, uh, I'm kind of new to Unix :). I installed the
following through Macports:


python26 @2.6.6_3 (active)
py26-gtk @2.22.0_1 (active)
py26-matplotlib @1.0.1_3+tkinter (active)
py26-numpy @1.6.0_0+atlas+gcc44 (active)


and the following code:

> 
> from numpy import *
> import gtk
> import gobject
> import matplotlib
> matplotlib.use('GTKAgg')
> import matplotlib.pyplot as plt
> 

gives the following error on the pyplot import:


> 
> pydev debugger: warning: psyco not available for speedups (the debugger will
> still work correctly, but a bit slower)
> 
> pydev debugger: starting
> 
> Xlib:  extension "RANDR" missing on display "/tmp/launch-KDlxaE/org.x:0".
> 
> Traceback (most recent call last):
> 
>   File 
> "/Applications/eclipseJavaHelios/plugins/org.python.pydev.debug_2.0.0.20110404
> 03/pysrc/pydevd.py", line 1134, in 
> 
> debugger.run(setup['file'], None, None)
> 
>   File 
> "/Applications/eclipseJavaHelios/plugins/org.python.pydev.debug_2.0.0.20110404
> 03/pysrc/pydevd.py", line 918, in run
> 
> pydev_imports.execfile(file, globals, locals) #execute the script
> 
>   File 
> "/Users/jwjameson/Dropbox/mine/PyStuff/workspace/Continuous/Pothead/Animator_P
> H_MPL.py", line 20, in 
> 
> import matplotlib.pyplot as plt
> 
>   File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/sit
> e-packages/matplotlib/pyplot.py", line 95, in 
> 
> new_figure_manager, draw_if_interactive, show = pylab_setup()
> 
>   File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/sit
> e-packages/matplotlib/backends/__init__.py", line 25, in pylab_setup
> 
> globals(),locals(),[backend_name])
> 
>   File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/sit
> e-packages/matplotlib/backends/backend_gtkagg.py", line 10, in 
> 
> from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
> FigureCanvasGTK,\
> 
>   File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/sit
> e-packages/matplotlib/backends/backend_gtk.py", line 28, in 
> 
> from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK
> 
>   File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/sit
> e-packages/matplotlib/backends/backend_gdk.py", line 29, in 
> 
> from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array
> 
> ImportError: No module named _backend_gdk



I noticed the page:
http://matplotlib.sourceforge.net/faq/installing_faq.html

says nothing about Macports.

I noticed the page 
http://old.nabble.com/_backend_gdk-not-found-td26514059.html


where Mr. Hunter says:

> matplotlib is probably not finding pygtk at build time -- you need
> have pkg-config installed, and  locate your pygtk-2.0.pc file and then
> add that path to your PKG_CONFIG_PATH.  You can check the output of
> the build script at the beginning in the section
> 
> OPTIONAL BACKEND DEPENDENCIES
> libpng: 1.2.27
>Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
>   wxPython: 2.8.8.0
> * WxAgg extension not required for wxPython >= 2.8
>   Gtk+: gtk+: 2.14.4, glib: 2.18.2, pygtk: 2.13.0,
> pygobject: 2.15.3
>Mac OS X native: no
> Qt: Qt: 3.3.8, PyQt: 3.17.4
>Qt4: Qt: 4.4.3, PyQt4: 4.4.4
>  Cairo: 1.4.12
> 
> You need to have an entry for Gtk or else the backend will not be built.
> 


but I have no idea how to utilize this info with Macports. I was not able to
locate a pygtk-2.0.pc file. If there were such a file, would Macports look
at it to configure the matplotlib installation as I would like (to be able
to use the GTKAgg backend)?

Any suggestions are greatly appreciated!
best,
john




--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] can't update transform for polygon animation

2010-02-16 Thread John Jameson
Hi John,

Thanks for your help on the animation with patches, and now
I'm trying to do the same idea for matplotlib.patches.Polygon 
ala your method for a circle patch:

initialize:
xy =[[x0,y0],[x1,y1],[x2,y2]]
  poly = Polygon( xy, animated=True,lw=2,fill=False )
add_patch(poly)
.
.
in the loop:
poly.set_xy = xy_new
poly.update_transorm()  (no such routine)   

  
The set_xy seems to work (at least no errors), but I don't see how 
to "update the transform" as for the circle.

here I am looking at:
http://matplotlib.sourceforge.net/api/artist_api.html?highlight=polygon#matp
lotlib.patches.Polygon 

thanks,
john





-Original Message-
From: John Hunter [mailto:jdh2...@gmail.com] 
Sent: Sunday, February 14, 2010 7:39 PM
To: John Jameson
Cc: matplotlib-users@lists.sourceforge.net; Michael Droettboom
Subject: Re: [Matplotlib-users] memory leak for GTKAgg animation

On Sat, Feb 13, 2010 at 2:53 PM, John Jameson 
wrote:
> HI,
> I find the very basic animation below has a memory leak (my pagefile usage
> number keeps growing in the Windows XP Windows Task Manager Performance
> graph).I don't see this with the "animation_blit_gtk.py" example on:
>
> http://matplotlib.sourceforge.net/examples/index.html
>
> (which I used as a starting point for this). In "animation_blit_gtk.py"
the
> set_ydata() routine is used to update the line for the animation and this
> does not leak. But if you call plot again with the new y_data (instead of
> using set_ydata), this leaks too. Anyone have an idea on how to stop the
> leak?

This isn't a memory leak.  The problem is that you keep adding new
patches to the axes when you want just one with different data.  Eg,
in your loop, run this code, and you will see that the number of
patches is growing:


   x_cir = 1.0 + 0.003*update_line.cnt
   cir =  CirclePolygon((x_cir, 1), 0.3, animated=True, \
   resolution=12, lw=2 )
   ax.add_patch(cir)
   ax.draw_artist(cir)
   print 'num patches=%d, mem usage=%d'%(
   len(ax.patches), cbook.report_memory(update_line.cnt))
   canvas.blit(ax.bbox)

You should add just one patch and then manipulate the data.  In this
case, you are using a CirclePolygon which derives from RegularPolygon
and so you can update the "xy" property

 
http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.Reg
ularPolygon

But on testing this it looks like there is a bug in that the set_xy
property setter is ignored.  I worked around this in the func below by
setting the private variable directly, but this looks like a bug we
need to fix (Michael, shouldn't we respect the xy passed in in
patches.RegularPolygon._set_xy ?).  In the meantime, the following
workaround should work for you w/o leaking

def update_line():
   global x, y
   print update_line.cnt
   if update_line.background is None:
   update_line.background = canvas.copy_from_bbox(ax.bbox)
   canvas.restore_region(update_line.background)

   x_cir = 1.0 + 0.003*update_line.cnt

   if update_line.cir is None:
   cir =  CirclePolygon((x_cir, 1), 0.3, animated=True, \
   resolution=12, lw=2 )
   ax.add_patch(cir)
   update_line.cir = cir
   else:
   update_line.cir._xy = x_cir, 1
   update_line.cir._update_transform()
   ax.draw_artist(update_line.cir)
   print 'num patches=%d, xy=%s, mem usage=%d'%(
   len(ax.patches), update_line.cir.xy,
cbook.report_memory(update_line.cnt))
   canvas.blit(ax.bbox)

   if update_line.direction == 0:
   update_line.cnt += 1
   if update_line.cnt > 500:
   update_line.direction = 1
   else:
   update_line.cnt -= 1
   if update_line.cnt < 100:
   update_line.direction = 0

   return update_line.cnt<100


update_line.cnt = 0
update_line.direction = 0
update_line.background = None
update_line.cir = None



--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] simple GTK agg animation with patches

2010-02-15 Thread John Jameson
Thought I would post this as a simple GTKagg animation 
with patches (after John Hunter fixed it for me :-):





import pygtk, gobject
import matplotlib
matplotlib.use('GTKAgg')
import numpy as np
import matplotlib.pyplot as plt
import pylab 
from matplotlib.patches import CirclePolygon, Polygon

fig = plt.figure(figsize=(10,6))
ax = fig.add_subplot(111, autoscale_on=False )
canvas = fig.canvas

plt.axis([-1, 7, -0.5, 2.2])

def update_line():
   global x, y
   print update_line.cnt_tot
   if update_line.background is None:
   update_line.background = canvas.copy_from_bbox(ax.bbox)
   canvas.restore_region(update_line.background)

   x_cir = 1.0 + 0.003*update_line.cnt

   if update_line.cir is None:
   cir =  CirclePolygon((x_cir, 1), 0.3, animated=True, \
   resolution=12, lw=2 )
   ax.add_patch(cir)
   update_line.cir = cir
   else:
   update_line.cir._xy = x_cir, 1
   update_line.cir._update_transform()
   ax.draw_artist(update_line.cir)

   canvas.blit(ax.bbox)

   if update_line.direction == 0:
   update_line.cnt += 1
   update_line.cnt_tot += 1 
   if update_line.cnt > 500:
   update_line.direction = 1
   else:
   update_line.cnt -= 1
   update_line.cnt_tot += 1 
   if update_line.cnt < 100:
   update_line.direction = 0

   return update_line.cnt<10


update_line.cnt = 0
update_line.cnt_tot = 0
update_line.direction = 0
update_line.background = None
update_line.cir = None

def start_anim(event):
gobject.idle_add(update_line)
canvas.mpl_disconnect(start_anim.cid)

start_anim.cid = canvas.mpl_connect('draw_event', start_anim)

plt.show()



--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] memory leak for GTKAgg animation

2010-02-15 Thread John Jameson
Hi John -
Yes thanks again!  This did it. Plus it is a valuable lesson
 - it never occurred to me to look at the base class to find 
more useful methods.  To make this cleaner I will post the
complete simple working example after this message.
best,
John  

-Original Message-
From: John Hunter [mailto:jdh2...@gmail.com] 
Sent: Sunday, February 14, 2010 7:39 PM
To: John Jameson
Cc: matplotlib-users@lists.sourceforge.net; Michael Droettboom
Subject: Re: [Matplotlib-users] memory leak for GTKAgg animation

On Sat, Feb 13, 2010 at 2:53 PM, John Jameson 
wrote:
> HI,
> I find the very basic animation below has a memory leak (my pagefile usage
> number keeps growing in the Windows XP Windows Task Manager Performance
> graph).I don't see this with the "animation_blit_gtk.py" example on:
>
> http://matplotlib.sourceforge.net/examples/index.html
>
> (which I used as a starting point for this). In "animation_blit_gtk.py"
the
> set_ydata() routine is used to update the line for the animation and this
> does not leak. But if you call plot again with the new y_data (instead of
> using set_ydata), this leaks too. Anyone have an idea on how to stop the
> leak?

This isn't a memory leak.  The problem is that you keep adding new
patches to the axes when you want just one with different data.  Eg,
in your loop, run this code, and you will see that the number of
patches is growing:


   x_cir = 1.0 + 0.003*update_line.cnt
   cir =  CirclePolygon((x_cir, 1), 0.3, animated=True, \
   resolution=12, lw=2 )
   ax.add_patch(cir)
   ax.draw_artist(cir)
   print 'num patches=%d, mem usage=%d'%(
   len(ax.patches), cbook.report_memory(update_line.cnt))
   canvas.blit(ax.bbox)

You should add just one patch and then manipulate the data.  In this
case, you are using a CirclePolygon which derives from RegularPolygon
and so you can update the "xy" property

 
http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.Reg
ularPolygon

But on testing this it looks like there is a bug in that the set_xy
property setter is ignored.  I worked around this in the func below by
setting the private variable directly, but this looks like a bug we
need to fix (Michael, shouldn't we respect the xy passed in in
patches.RegularPolygon._set_xy ?).  In the meantime, the following
workaround should work for you w/o leaking

def update_line():
   global x, y
   print update_line.cnt
   if update_line.background is None:
   update_line.background = canvas.copy_from_bbox(ax.bbox)
   canvas.restore_region(update_line.background)

   x_cir = 1.0 + 0.003*update_line.cnt

   if update_line.cir is None:
   cir =  CirclePolygon((x_cir, 1), 0.3, animated=True, \
   resolution=12, lw=2 )
   ax.add_patch(cir)
   update_line.cir = cir
   else:
   update_line.cir._xy = x_cir, 1
   update_line.cir._update_transform()
   ax.draw_artist(update_line.cir)
   print 'num patches=%d, xy=%s, mem usage=%d'%(
   len(ax.patches), update_line.cir.xy,
cbook.report_memory(update_line.cnt))
   canvas.blit(ax.bbox)

   if update_line.direction == 0:
   update_line.cnt += 1
   if update_line.cnt > 500:
   update_line.direction = 1
   else:
   update_line.cnt -= 1
   if update_line.cnt < 100:
   update_line.direction = 0

   return update_line.cnt<100


update_line.cnt = 0
update_line.direction = 0
update_line.background = None
update_line.cir = None



--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] memory leak for GTKAgg animation

2010-02-13 Thread John Jameson
HI,
I find the very basic animation below has a memory leak (my pagefile usage
number keeps growing in the Windows XP Windows Task Manager Performance
graph).I don't see this with the "animation_blit_gtk.py" example on:

http://matplotlib.sourceforge.net/examples/index.html

(which I used as a starting point for this). In "animation_blit_gtk.py" the
set_ydata() routine is used to update the line for the animation and this
does not leak. But if you call plot again with the new y_data (instead of
using set_ydata), this leaks too. Anyone have an idea on how to stop the
leak? 

thanks,
john




import gtk, gobject
import matplotlib
matplotlib.use('GTKAgg') 
import numpy as np
import matplotlib.pyplot as plt
from pylab import *
from matplotlib.patches import CirclePolygon

fig = plt.figure(figsize=(10,6))
ax = fig.add_subplot(111, autoscale_on=False )
canvas = fig.canvas

plt.axis([-1, 7, -0.5, 2.2])


def update_line():
global x, y
print update_line.cnt
if update_line.background is None:
update_line.background = canvas.copy_from_bbox(ax.bbox)
canvas.restore_region(update_line.background)

x_cir = 1.0 + 0.003*update_line.cnt 
cir =  CirclePolygon((x_cir, 1), 0.3, animated=True, \
resolution=12, lw=2 )
ax.add_patch(cir)
ax.draw_artist(cir)

canvas.blit(ax.bbox)

if update_line.direction == 0:
update_line.cnt += 1
if update_line.cnt > 500:
update_line.direction = 1
else:
update_line.cnt -= 1
if update_line.cnt < 100:
update_line.direction = 0

return True



update_line.cnt = 0
update_line.direction = 0
update_line.background = None

def start_anim(event):
gobject.idle_add(update_line)
canvas.mpl_disconnect(start_anim.cid)

start_anim.cid = canvas.mpl_connect('draw_event', start_anim)

plt.show()



--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] blit animation with patches

2010-02-10 Thread John Jameson
Hi - 
I am wondering how to animate using blit and patches. 
The code below was modified from one of the examples.
You will see that it shows (and moves) the rectangle just fine, but 
the circle never shows up.
best,
Jaron



import gtk, gobject
import matplotlib
matplotlib.use('GTKAgg') #Agg rendering to a GTK canvas (requires PyGTK)
import numpy as np
import matplotlib.pyplot as plt
from pylab import *
from matplotlib.patches import CirclePolygon

fig = plt.figure(figsize=(14,10))
ax = fig.add_subplot(111, autoscale_on=False )
canvas = fig.canvas

x_start = array([1.0, 2, 2, 1, 1])
y_start = array([1.0, 1, 2, 2, 1])

plt.axis([-1, 7, -0.5, 2.2])

def update_line():
global x, y
print update_line.cnt
if update_line.background is None:
update_line.background = canvas.copy_from_bbox(ax.bbox)
canvas.restore_region(update_line.background)

x = x_start + 0.012 * update_line.cnt 
y = y_start + 0.0001 * update_line.cnt 
line, = ax.plot(x, y, animated=True, lw=2)
ax.draw_artist(line)

x_cir = 1.0 + 0.001*update_line.cnt 
cir =  CirclePolygon((x_cir, 1), 0.3, animated=True,  resolution=6, lw=2
)
ax.draw_artist(cir)

canvas.blit(ax.bbox)

if update_line.cnt == 1:
gtk.mainquit()
raise SystemExit
update_line.cnt += 1
return True

update_line.cnt = 0
update_line.background = None

def start_anim(event):
gobject.idle_add(update_line)
canvas.mpl_disconnect(start_anim.cid)

start_anim.cid = canvas.mpl_connect('draw_event', start_anim)

plt.show()





--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users