I was trying to plot a 2D array vs a 1D array with pyplot. I can do that with no problems and columns in the 2D array are treated like two different sets of Y datas, which is what i want. What i don't know is how to specify a different color for every column in the 2d array. if i use pyplot.plot(1darray, 2darray, "r-")
every column in 2d array is plotted red for example. SHould i modify the standard color map or is there a smarter way? Thanks
Tell me more
×
Stack Overflow is a question and answer site for
professional and enthusiast programmers. It's 100% free, no registration required.
|
|||
If you want to use custom colors for each column, then the best approach is to plot each column explicitly using a loop:
You may have to use |
|||||
|
pyplot.plot(1darray, 2darray, "-")
– Björn Pollex Mar 25 '11 at 8:30