[R-sig-Geo] How to set spplot background?

David Forrest drf5n at maplepark.com
Sat Nov 19 00:05:14 CET 2005


On Fri, 18 Nov 2005, Francisco J. Zagmutt wrote:

> RSiteSearch("background lattice")

Thanks Francisco.

spplot calls trellis stuff, features of which are controlled by
trellis.par.set()

trellis.par.set(theme=col.whitebg()) # works
trellis.par.set(background="white")  # works

col.whitebg() returns a list of light-backgrounded trellis settings that
work together.


>
> Francisco
>
>
>
> >From: David Forrest <drf5n at maplepark.com>
> >Reply-To: David Forrest <drf5n at maplepark.com>
> >To: r-sig-geo at stat.math.ethz.ch
> >Subject: [R-sig-Geo] How to set spplot background?
> >Date: Fri, 18 Nov 2005 15:50:49 -0600 (CST)
> >
> >Hi,
> >
> >The examples on http://r-spatial.sourceforge.net/gallery/ all have dark
> >grey backgrounds on them.  E.g. :
> >
> >library(sp)
> >library(lattice) # required for trellis.par.set():
> >trellis.par.set(sp.theme()) # sets color ramp to bpy.colors()
> >
> >data(meuse)
> >coordinates(meuse)=~x+y
> >
> >## coloured points plot with legend in plotting area and scales:
> >spplot(meuse, "zinc", do.log = TRUE,
> >	key.space=list(x=0.2,y=0.9,corner=c(0,1)),
> >	scales=list(draw=T))
> >
> >gives http://r-spatial.sourceforge.net/gallery/fig/fig01.png
> >
> >
> >What do I have to to do to make the plot have a lighter background?
> >
> >Also, the later examples on http://r-spatial.sourceforge.net/gallery/ seem
> >to fail by not finding SpatialPolygons()  Should those examples be
> >revised?
> >
> >meuse.sr =
> >SpatialPolygons(list(Polygons(list(Polygon(meuse.riv)),"meuse.riv")))
> >
> >Dave
> >--
> >  Dr. David Forrest
> >  drf at vims.edu                                    (804)684-7900w
> >  drf5n at maplepark.com                             (804)642-0662h
> >                                    http://maplepark.com/~drf5n/
> >
> >_______________________________________________
> >R-sig-Geo mailing list
> >R-sig-Geo at stat.math.ethz.ch
> >https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
 Dr. David Forrest
 drf at vims.edu                                    (804)684-7900w
 drf5n at maplepark.com                             (804)642-0662h
                                   http://maplepark.com/~drf5n/




More information about the R-sig-Geo mailing list