Joe Kington's answer is the best solution I've seen to this problem:
http://stackoverflow.com/questions/13622909/matplotlib-how-to-colorize-a-large-number-of-line-segments-as-independent-gradi
There is also an example in the gallery:
http://matplotlib.org/examples/pylab_examples/multicolored_line.html
HTH
On 27 February 2013 09:49, Rita <rmorgan...@gmail.com> wrote:
> Hi,
>
> I am currently plotting cpu utilization over time (plot_time). I would
> like the color of my line to be red when at 100%. 80-90% a bit less red,
> more yellow, and lower numbers will be green. Any thoughts of doing this?
>
>
> --
> --- Get your facts first, then you can distort them as you please.--
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users