Re: [Matplotlib-users] Removing a line from a plot

2008-03-29 Thread greg whittier
Anyone find an answer to this one? I'm running into this issue with 0.90.1and I found this in the archives. I tried the suggested code and it doesn't seem to work for me. Right now my workaround is min_x = min([min(line.get_xdata()) for line in self.axes.lines]) max_x = max([max

Re: [Matplotlib-users] Removing a line from a plot

2006-11-14 Thread Andrea Gavana
Hi John, sorry to come back so late with this subject. Well, I have tried your suggestion: > When you add lines to the plot, the dataLim are updated, but when you > remove data with del ax.lines[-1] etc, the dataLim are not updated. > If all you have in the Axes are line instances, you can up

Re: [Matplotlib-users] Removing a line from a plot

2006-11-10 Thread John Hunter
> "Andrea" == Andrea Gavana <[EMAIL PROTECTED]> writes: Andrea> Hi Gang, Thank you guys, and thanks for the Wiki entry ;-) Andrea> Andrea. Andrea> I have a further small question. When I add a line to my Andrea> plot, the axes gracefully rescale to accomodate the new Andre

Re: [Matplotlib-users] Removing a line from a plot

2006-11-10 Thread Andrea Gavana
Hi Gang, Andrea> Thank you guys, and thanks for the Wiki entry ;-) Andrea. I have a further small question. When I add a line to my plot, the axes gracefully rescale to accomodate the new data plotted. However, when I remove a line, they do not rescale, even if I call: locator = self.leftaxis.ya

Re: [Matplotlib-users] Removing a line from a plot

2006-11-09 Thread Fernando Perez
On 11/9/06, John Hunter <[EMAIL PROTECTED]> wrote: > > "Andrea" == Andrea Gavana <[EMAIL PROTECTED]> writes: > > Andrea> Thank you guys, and thanks for the Wiki entry ;-) Andrea. > > Since ax.lines is just a list, you can also use the "remove" method > > line1, = ax.plot(something) > li

Re: [Matplotlib-users] Removing a line from a plot

2006-11-09 Thread John Hunter
> "Andrea" == Andrea Gavana <[EMAIL PROTECTED]> writes: Andrea> Thank you guys, and thanks for the Wiki entry ;-) Andrea. Since ax.lines is just a list, you can also use the "remove" method line1, = ax.plot(something) line2, = ax.plot(somethingelse) line3, line4 = ax.plot(x3, y3, x

Re: [Matplotlib-users] Removing a line from a plot

2006-11-09 Thread Andrea Gavana
Thank you guys, and thanks for the Wiki entry ;-) Andrea. On 11/9/06, Pierre GM <[EMAIL PROTECTED]> wrote: > > > I have a GUI written in wxPython, the main portion of it is a > > matplotlib canvas. There is a tree control on the left with > > checkboxes: if the user checks a checkbox, I add a lin

Re: [Matplotlib-users] Removing a line from a plot

2006-11-08 Thread Pierre GM
> I have a GUI written in wxPython, the main portion of it is a > matplotlib canvas. There is a tree control on the left with > checkboxes: if the user checks a checkbox, I add a line on the plot. > So far so good. The problem comes when the user *un-checks* the > checkbox. I would like to remove

[Matplotlib-users] Removing a line from a plot

2006-11-08 Thread Andrea Gavana
Hi NG, I posted this question few months ago and I didn't receive any answer, so I'll try to rephrase my problem. I have a GUI written in wxPython, the main portion of it is a matplotlib canvas. There is a tree control on the left with checkboxes: if the user checks a checkbox, I add a line o