Skip to content
Prev 25809 / 29559 Next

Adding text to rasterVis levelplot

Thank you very much you both Thiago and Florian for your help.

Just for future searches on Google, the minimal example that allows
creating the plot i was looking for was:

------ START -----
library(rasterVis)

f <- system.file("external/test.grd", package="raster")
r <- raster(f)
s <- stack(r, r+500, r-500, r+200)

col.titles = c('col1','col2','','')
row.titles = c('row1','row2')

levelplot(s, layout=c(2,2),
          names.attr=col.titles,
          ylab=row.titles,
          scales = list(y = list(rot = 90) )
          )

------ END -----

However, the example provided by Florian opened up new possibilities
with the grid package for more customisation.

Kind regards,

Mauricio

Mauricio Zambrano-Bigiarini, PhD

=====================================
Department of Civil Engineering
Faculty of Engineering and Sciences
Universidad de La Frontera, Temuco, Chile
=====================================
"The ultimate inspiration is the deadline"
(Nolan Bushnell)
=====================================
Linux user #454569 -- Linux Mint user


On 21 July 2017 at 04:21, Florian Detsch
<florian.detsch at staff.uni-marburg.de> wrote: