Re: [Matplotlib-users] remove text from a plot

2006-08-19 Thread Eric Firing
Aaron, Each text object that you add with the text() function is appended to a list called "texts" that is an attribute of the axes object. So, to remove the last text object you added, you can do: del gca().texts[-1] draw() If what you want to do is change the contents but not the position,

[Matplotlib-users] remove text from a plot

2006-08-19 Thread Aaron Hoover
Matplotlib is great. Between numpy, scipy, and matplotlib, I'm almost completely weaned myself off of Matlab (just need to rewrite a bunch of m-files in Python). My question is, is there an easy way to remove text that's been added with the text() function from a plot (like if I make a mistake