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.–
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
On 27 February 2013 09:49, Rita <rmorgan466@…287…> 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.–
A few years ago, Gökhan Sever posted this technique, which is the simplest
and best I've seen:
···
On Wed, Feb 27, 2013 at 1:49 AM, Rita <rmorgan466@...287...> 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?
##
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
x = np.linspace(0, 3 * np.pi, 5000)
y = np.sin(x)
z = np.cos(0.5 * (x[:-1] + x[1:])) # 1st derivative
cmap_z = cm.coolwarm(z)