Re: [Matplotlib-users] Ways of updating legends

2010-02-11 Thread Jorge Scandaliaris
El 11/02/10 18:28, Jae-Joon Lee escribió: > You're already using "ax.legend", what kind of OO way do you want? > > Instead of calling plt.legend, you may do >ax.legend([s],[str(i)]) > Thanks Jae-Joon. You're right. I tried this before, but I must have done something wrong then, because when

Re: [Matplotlib-users] Ways of updating legends

2010-02-11 Thread Jae-Joon Lee
You're already using "ax.legend", what kind of OO way do you want? Instead of calling plt.legend, you may do ax.legend([s],[str(i)]) Or, if you know what you're doing, you can do leg = ax.legend([s],[''], loc=0) and in the for loop, leg.texts[0].set_text(str(i)) Regards, -JJ On Thu,

[Matplotlib-users] Ways of updating legends

2010-02-11 Thread Jorge Scandaliaris
Hi, I am re-using a scatter plot in the same figure for interactively displaying results without ending up with 30 windows open. The legend is relevant, and so it must be also updated. So far the only way I found was to use the set_label() method and then using plt.legend(). Is this the only way to