plotting a matrix vs a vector


there a quick and easy way to plot the columns of a matrix versus a
vector and get different color lines for each column? If I try

In [50]: shape(timevector)

Out[50]: (21001, 1)

In [51]: shape(datamatrix)

Out[51]: (21001, 3)

In [52]: plot(timevector,datamatrix)

I get:

RuntimeError: xdata and ydata must be the same length

In matlab, this would give me 3 diffent color lines, one for each
column of datamatrix.

plot(timevector,datamatrix[:,i]) works just fine for one line

Do I need to define a matrix plotting function like

def matrixplot(xvect,ymat):


for i in range(shape(ymat)[1]):




or is there an easier/faster way?


I have just upgraded to OS X 10.4 on two machines. On one machine, pylab worked fine, on my notebook it hangs. I have begun trying to rebuild my fink tree but bomb at glib 2.6.2 / gtk+, pango-1.8.0 using fink as well as standalone installs for old items (pango is at 1.6 on fink, need 1.8 for gtk+2.6.0).

As an aside, numarray install bombed with gcc4.0 so I had to revert to gcc3.3.

Anyone else had problems with OS X 10.4 and pylab?