[R] Change panel background color in spplot()

Mark Difford mark_difford at yahoo.co.uk
Sat Mar 5 16:57:26 CET 2011


Marcel,

Here is one way:

spplot(meuse.grid, zcol = "part.a", par.settings =
list(panel.background=list(col="grey")))

##
trellis.par.get()
trellis.par.get()$panel.background

Regards, Mark.


> On 03/05/2011 01:06 PM, Marcel J. wrote: 
>> Hi! 
>> 
>> How does one change the background color of the map-panel in spplot()? 
>> 
>> Example: 
>> 
>> library(sp) 
>> 
>> data(meuse.grid) 
>> gridded(meuse.grid) = ~x+y 
>> 
>> spplot(meuse.grid, "part.a") 
>> 
>> How would I get another background-color for the map-panel (but not 
>> for the whole plot) here? 
>> 
>> Thank you! 
>> 
>> Marcel

--
View this message in context: http://r.789695.n4.nabble.com/Change-panel-background-color-in-spplot-tp3336563p3336769.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list