Skip to content
Prev 16064 / 29559 Next

background colour when add=T

Rob -
Without seeing your code, I'm not exactly sure what you are trying to 
do.  But, I routinely control the appearance of land vs. sea with a 
setup something like this:

bg.spdf    # a spatialPolygonsDataFrame with 1 polygon for ocean and 1 
for land
bg.fill  <- c('transparent', 'gray')   # If the wrong one is filled, 
switch order
data.sgdf   # A spatialGridDataFrame of the data I want to plot

spplot(data.sgdf, panel = function(x, y, ...){
         sp.polygons(bg.spdf, fill = bg.fill)
         })

Hope that helps.

M
On 9/13/2012 1:29 PM, Greg Snow wrote: