Kelvin
2008-Feb-06 00:38 UTC
[R] Levelplot of percentages always using 0 to 100 in the color scheme
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.
Deepayan Sarkar
2008-Feb-06 16:16 UTC
[R] Levelplot of percentages always using 0 to 100 in the color scheme
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