On 1 June 2010 19:05, Howard Sun <h...@nvidia.com> wrote:

> Sorry for the newbie question, how do you plot one x with multiple ys. In
> below data, x column is followed by 5 y columns:
> Many thanks!
>

You can make an x vector and a y array, so that the first dimension of y is
the same length as x:

import numpy as np
import matplotlib.pyplot as plt
x = np.arange(2,21)
y = np.random.random(size=(19,5)) + np.arange(5)[None,:]
plt.plot(x,y)

Angus.
-- 
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh
------------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to