Trying again, a little more detail:
I am trying to use the color setting feature of SCATTER:
colors=cm.spectral(linespace(0,100,len(x))
then, plotting:
scatter(x,y,c=colors)
I get the error:
TypeError: c must be a matplotlib color arg or a sequence of them
But I don't understand.
x.shape
John Washakie wrote:
Trying again, a little more detail:
I am trying to use the color setting feature of SCATTER:
colors=cm.spectral(linespace(0,100,len(x))
then, plotting:
scatter(x,y,c=colors)
I get the error:
TypeError: c must be a matplotlib color arg or a sequence of them
Eric,
Exactly. Thanks for your post. I finally figured it out, and wanted to
post here for completeness in case no one followed up, but I'm glad
that you did. So yes, the following:
scatter(x, y, c=arange(len(x)), cmap=cm.spectral)
is exactly what I wanted... except that for my data I had: