[R] [Lattice] panel.levelplot - shrink argument to highlight absolute z-values

nabble.30.miller_2555 at spamgourmet.com nabble.30.miller_2555 at spamgourmet.com
Sat Jan 9 18:07:12 CET 2010


Hi -

    I have a levelplot with positive and negative z-values. I'd like
to scale the levelplot rectangles proportional to the *absolute*
z-values to highlight the z-value extremes (while retaining the color
difference to track the positive/negative attribute). I've likely
missed something in the documentation, but have been at it a couple
days without finding a solution (other than patching the
panel.levelplot routine). Is there a way to do this? If not, can we
add the functionality?

    By way of a very simple example, I'd like to make the deep-colors
bigger in the following example (please note the I am using the
`expression` version of the leveplot() function with a data frame
instead of the `matrix` version in my particular application).

       >  levelplot(matrix(runif(21),nrow=7,ncol=3)-0.5,panel=function(x,y,z,subscript,
...) { panel.levelplot(x,y,z,shrink=c(0,2),...)})


Thanks!



More information about the R-help mailing list