[R] levelplot and contour lines

rchandler at nrc.umass.edu rchandler at nrc.umass.edu
Thu Jun 10 18:00:35 CEST 2010


Hello list,

Is there a way to add contour lines to a levelplot at different  
breakpoints than are used for the colors? For example:


library(lattice)

# colors good but too many contours
levelplot(volcano, at=94:195, contour=TRUE)

# I thought something like this might work
levelplot(volcano,
     panel=function(...) {
         panel.levelplot(..., at=94:195)
         panel.contourplot(..., at=c(100, 125, 150))
         })


Thanks,
Richard


--
UMass Amherst
Natural Resources Conservation



More information about the R-help mailing list