Re: [Matplotlib-users] Plotting a list of lines

2008-11-29 Thread John Hunter
On Thu, Nov 27, 2008 at 11:21 AM, Mauro Cavalcanti [EMAIL PROTECTED] wrote: Then, in a checkbox event, I do the following: index = event.GetSelection() plot = self.plot_list[index] if self.FileList.IsChecked(index): plot[0].set_visible(True) else: plot[0].set_visible(False)

[Matplotlib-users] Plotting a list of lines

2008-11-27 Thread Mauro Cavalcanti
Dear ALL, Is there a way to plot a list (a Python list) of lines (MPL Line2D objects) at once? For example, inside a loop I have: for i in range(n): line, = ax.plot(x,y) plot_list.append(line) In the code fragment above, plot_list is an ordinary Python list which will be filled with

Re: [Matplotlib-users] Plotting a list of lines

2008-11-27 Thread Mauro Cavalcanti
Dear John, Thank you very much for your thoughtful reply. Indeed, the code fragment I sent was incomplete and not expected to do nothing else than illustrate the general idea (what, hopefully, it did). You suggested collections, and in my previous attempts I have already used them (worked quite