[R-sig-Geo] image background for spplot of gridded data
Waichler, Scott R
Scott.Waichler at pnnl.gov
Wed Nov 20 01:32:50 CET 2013
I was told, among other things, to look for previous messages by Oscar that would explain how to do this. Here is Oscar's solution that I found to work for the case where you want to plot two rasters that have different extents. In my case, gmap is a satellite image obtained with RgoogleMaps, and z are the results I want to plot over the background image. I made the alpha values of z less than 1 so that the background image would show through.
library(rasterVis)
levelplot(z~x*y) +
layer_(grid.raster(gmap, y=latCenter, width=width, height=height, default.units='native'))
Scott Waichler
More information about the R-sig-Geo
mailing list