On 7/30/2011 12:03 AM, Alan G Isaac wrote:
> I'd like to pick the color for each line
> based on its parameter value by mapping
> possible parameter values to the colors
> in a color map (e.g., gist_rainbow),
> retrieving colors one at a time (based
> on the parameter value for a line).



As far as I can tell, the answer is the following.
1. scale the parameter to fall in (0,1)
2. get a color (rgba tuple) as cm.gist_rainbow(scaled_param)
3. plot using that color

This works.

Cheers,
Alan Isaac


------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to