[R-sig-Geo] spplot: character size of color key labels

Edzer Pebesma edzer.pebesma at uni-muenster.de
Tue Jun 14 23:52:03 CEST 2011


Renaud, as spplot is a wrapper around xyplot or levelplot in package
lattice, try to pass par.settings as a list; its contents can be learned
from:

library(lattice)
trellis.par.get()
?trellis.par.set

an example is:

xyplot(a~b,data.frame(a=1:3,b=1:3,c=1:3),groups=c,auto.key=T,par.settings=list(fontsize=list(text=20)))
# read arg par.settings in ?xyplot

as you can see, it resizes all other characters as well. No doubt there
is a way to do this more fine grained.

This may be personal, but I find myself rarely (if ever) in need of
this. Font sizes can be manipulated to some extent indirectly by
changing the size of the plotting region.

Hth,

On 06/14/2011 10:26 PM, Renaud Lancelot wrote:
> Dear all,
> 
> How can I control the character size  of color key labels produced by
> spplot ? I have unsucessfully tried to use cex, as in
> 
> spplot(obj, zcol = "var1",
>              panel = function(...){
>                  panel.polygonsplot(...)
>                  sp.text(coordinates(obj), txt = as.character(obj at data$z))
>              },
>              cex = 1.5)
> 
> All the best,
> 
> Renaud

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list