I also recently posted an example that may do something similar to what you
are after, you can have a look here:
http://www.nabble.com/contribute-to-gallery--Or%2C-just-advice-on-changing-colors-automagically....-td24419101.html#a24427781



per freem-2 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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/question-about-setting-colors-of-lines-using-colormap-tp24479842p24498248.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
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

Reply via email to