Re: [Matplotlib-users] update an existing contour plot with new data

2010-07-09 Thread Johannes Röhrs
plot is much faster/more efficient than deleting and recreating the plot. - Original Message - From: "Ryan May" To: "Johannes Röhrs" Cc: matplotlib-users@lists.sourceforge.net Sent: Friday, 9 July, 2010 5:11:37 PM Subject: Re: [Matplotlib-users] update an existing c

[Matplotlib-users] update an existing contour plot with new data

2010-07-09 Thread Johannes Röhrs
Hi, I have some troubles updating a contour plot. I reduced my code to a simple example to reproduce the problem: [code] from pylab * import scipy as sp x=sp.arange(0,2*sp.pi,0.1) X,Y=sp.meshgrid(x,x) f1=sp.sin(X)+sp.sin(Y) f2=sp.cos(X)+sp.cos(Y) figure() C=contourf(f1) show() C.set_array(f2