## [Matplotlib-users] many plots

 [Matplotlib-users] many plots From: Saurav Pathak - 2012-02-03 16:44:23 ```Hi All, First, thanks for a very cool and pretty tool! My problem is, I have a 2D numpy array, say m by n, and I would like to display the data in n plots (with the same abscissa). That is, the 2D numpy array holds n time series data with m points each. I could use pyplot.plot inside a loop to display it, but n is very large as a result of which it takes a long time to create the plot and display it. Is there another way to do this more efficiently? Thanks, Saurav ```

 [Matplotlib-users] many plots From: Saurav Pathak - 2012-02-03 16:44:23 ```Hi All, First, thanks for a very cool and pretty tool! My problem is, I have a 2D numpy array, say m by n, and I would like to display the data in n plots (with the same abscissa). That is, the 2D numpy array holds n time series data with m points each. I could use pyplot.plot inside a loop to display it, but n is very large as a result of which it takes a long time to create the plot and display it. Is there another way to do this more efficiently? Thanks, Saurav ```
 Re: [Matplotlib-users] many plots From: Benjamin Root - 2012-02-03 16:55:31 Attachments: Message as HTML ```On Fri, Feb 3, 2012 at 10:27 AM, Saurav Pathak wrote: > Hi All, > > First, thanks for a very cool and pretty tool! > > My problem is, I have a 2D numpy array, say m by n, and I would like to > display the data in n plots (with the same abscissa). That is, the 2D > numpy array holds n time series data with m points each. I could use > pyplot.plot inside a loop to display it, but n is very large as a result > of which it takes a long time to create the plot and display it. > > Is there another way to do this more efficiently? > > Thanks, > Saurav > > Just pass in the 2D array as the 'y' argument. A line plot will be made for each column in the 2D array and will even be automatically colored. All lines will show up on the same axes. Cheers! Ben Root ```
 Re: [Matplotlib-users] many plots From: Jae-Joon Lee - 2012-02-05 14:28:33 ```On Sat, Feb 4, 2012 at 1:27 AM, Saurav Pathak wrote: > Is there another way to do this more efficiently? I recommend you to use LineCollection, which should be much efficient. http://matplotlib.sourceforge.net/examples/api/collections_demo.html Regards, -JJ ```