|
From: Katie B. <kat...@gm...> - 2011-09-26 17:05:39
|
Hi All, I was wondering how I take a list of 250 discrete values and match up each value in the list to a color in the gist_rainbow colormap. I want the highest value to be red, and the lowest value to be blue. I then want to plot a point for each value in the list, and the point's color should represent its value. I cannot use contourf or any other function that does this automatically on a continuous grid--I need to plot individual points. I have tried creating my own colormap with: my_colors = matplotlib.colors.Colormap(my_list) but when I issue a pyplot.plot() command with the argument cmap=my_colors, I get "TypeError: There is no patch property "cmap" How do I do this correctly? Cheers, Katie |