[R] How to overlay a vector map (polygon) on raster maps?
kr|@t|@g|over @end|ng |rom hotm@||@com
Thu Apr 11 13:28:31 CEST 2019
He R users,
I have been struggling to plot a boundary map over the raster maps. I tried using the following example, but the boundary map could not be displayed over the three raster maps.
It works if we plot for a single raster. However when I want to plot the three maps using "levelplot" and add the boundary map it did not work. I wanted to plot three raster same time because the "levelplot" so that we can compare the maps as they have only one legend.
My example code is given below, do you have any suggestions?
levelplot(Temp, layout=c(1,3))+ layer(sp.polygons(boundary, col = "yellow"))
[[alternative HTML version deleted]]
More information about the R-help