Not too long ago, I posted an example of this to the list. The code
near the bottom of that thread is a little more general than the one
at the top and shows, three different ways to cycle through the colors
of a colormap.
Hope that helps,
-Tony
On Jul 14, 2009, at 9:51 AM, per freem wrote:
Hi all,
i would like to set the colors of the lines i plot (using the plot
function) to go from red to blue, in evenly spaced interval. that
is, imagine a color map from red to green, where i plot n-many
lines, each receiving a color from this color map, starting at the
red end and going to green.
the docs say how to set the color cycle of lines set by plot, using:
matplotlib.axes.set_default_color_cycle(['r', 'y', 'g', 'b'])
but this only allows me to use named colors, and here i am looking
to use shades from red to green.
my question is: first, how can i generate N evenly spaced colors
from the red spectrum to the green spectrum? and two, how can i make
it so plot uses these colors for its line plots?
thanks very much.
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited
time,
vendors submitting new applications to BlackBerry App World(TM) will
have
the opportunity to enter the BlackBerry Developer Challenge. See
full prize
details at:
http://p.sf.net/sfu/Challenge_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users