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

Kelvin kjmenzel at cox.net
Wed Feb 6 01:38:04 CET 2008


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.



More information about the R-help mailing list