[GIS] Levelplot(RasterVis) two marginal plot scale

profilerraster

enter image description here

How can I add/display scale to two marginal plot?

RAD1998.all <- stack(list.ras)

list.files <- mixedsort(list.files(paste(getwd(), "/1998bil/", sep = ""), full.names = F, pattern = ".asc.bil")) 
#list.files

outlist <- substr(list.files, 31, 43)
#outlist

png(paste("1998",outlist[[1]],".png",sep=""))
levelplot(RAD1998.all[[1]])
dev.off()

Best Answer

I have committed changes in the repository that implement the axis.

Use this code to install the latest development version:

## install.packages("devtools")
devtools::install_github("rastervis", "oscarperpinan")

Then, use the new argument axis.margin to enable the axis.

 f <- system.file("external/test.grd", package="raster")
 r <- raster(f)
 levelplot(r, axis.margin = TRUE)

enter image description here

Related Question