>2009/10/27 Piter_ <x.pi...@gmail.com>:
> I have a matrix M:
> First column is X ans the rest are Ys. Lets say  100 of them (1000
> sometimes).
> So far I can plot it like
> plot(M(:,1), M(:,2),M(:,1),M(:,3)... and so on and so on)
> Is there any possibility to do it in matlab way? Like:
>
> plot(M(:,1),M(:,2:end))

Hi Piter,

Does the following do what you want?

>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> x = np.arange(10)
>>> y = np.random.random((10, 5))
>>> M = np.column_stack((x, y))
>>> plt.plot(M[:, 0], M[:, 1:])
>>> plt.show()

Python indices start from zero, Matlab indices start from 1.

Cheers,
Scott

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to