Benjamin Root : > Just about any mpl plotting function (plot(), scatter(), hist(), etc.) > returns an object. Most of the time, users do not save the result > into a variable, but if you want to do advanced tricks, you will need > to save those returns. Sorry for a shameless attempt to add something to this, but actually here you don't need it, these collections are accessible through the current axes:
plt.plot([0, 1, 2, 3, 4], [4, 3, 2, 1, 0]) pts = plt.scatter([1, 2, 3], [1, 2, 3]) ax=plt.gca() ... del ax.collections[:] (Or, say, del ax.lines[:] to remove the first line ; I do it often when I plot a solution of a differential equation, a trajectory, keeping just a few last segments). == This reminds me a nuisance... Under Windows XP, ion() is not too compatible with show(). TKAgg (by default), WXAgg and GTKAgg bomb Bens program (and without draw() nothing is plotted). Jerzy Karczmarczuk ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users