0

I am trying to adjust the plotting of a raster in rasterVis. However, I get way too large blank spaces and cannot adjust the width of the legend bar or the histograms. I also tried the tutorials here on the main page of rasterVis but my plots never fill up the window. I also tried restarting the device and delete all the previous plots.

Any work around? Here is a reproducible example:

library(raster)
library(rasterVis)

raster_data <- raster(matrix(1:25, nrow = 5, ncol = 5))

levelplot(raster_data, col.regions = gray.colors(256),
          par.settings = list(layout.heights = list(hist = c(0.1, 0.9))))

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.