Re: [R] Levelplot of percentages always using 0 to 100 in the color scheme

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Wed, 6 Feb 2008 08:16:37 -0800

On 2/5/08, Kelvin <kjmenzel_at_cox.net> wrote:
> I am trying to create levelplot's of cpu usage for systems.
> print(levelplot(util.mean ~ x.hour * x.day, colorkey=T, cut=20,
> scales=list(x=list(at=seq(0,96,length=25),
> labels=ifelse(seq(0,24) %% 4 == 0, seq(0,24), ''))), # add
> tick marks at the hour
> main="CPU Utilization During November on idnprod",
>
> col.regions=colorRampPalette(c('white','green','yellow','red'))(101), #
> 101 colors
> xlab="Hours (15 minute intervals)", ylab="Day of the Month")
> )
> util.mean has the utilizations by timestamps
> If the values in util.mean are only 10-50, the plot codes 10 as white
> and low and 50 as red and high.
> What I would desire is the 0 is always the low and white and 100 always
> the high and red.

Specify a suitable 'at' argument; e.g.,

at = seq(0, 100, length = 51)

-Deepayan



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 06 Feb 2008 - 16:20:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Feb 2008 - 16:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive