[R-sig-Geo] spplot: character size of color key labels
Oscar Perpiñan Lamigueiro
oscar.perpinan at upm.es
Fri Jun 17 02:32:38 CEST 2011
Hi,
It seems to be a problem with sp:::fill.call.groups.
A workaround is to use auto.key=FALSE with spplot and then update with
auto.key=list(cex=3). It works with xyplot:
p <- xyplot(a~b,data.frame(a=1:3,b=1:3,c=1:3),groups=c,auto.key=FALSE,
par.settings=custom.theme.2())
update(p, auto.key=list(cex=3))
However, although it also works with spplot, I cannot get good results
because it seems to ignore the par.settings argument, and therefore the
colors of the points inside the graphic are different from the points
of the legend. Perhaps I am missing something...
Bye,
Oscar.
El Thu, 16 Jun 2011 19:26:54 +0200 Edzer Pebesma
<edzer.pebesma at uni-muenster.de> escribió:
> I also found that. Let me know if this is something urgently needed.
>
> On 06/16/2011 06:27 PM, lancelot wrote:
> > Thank you Oscar. I had tried it but it fails with spplot:
> >
> >> library(sp)
> >> data(meuse)
> >> coordinates(meuse) <- ~ x + y
> >> spplot(meuse, zcol = "ffreq", auto.key = list(cex = 3))
> > Error in !is.null(dots$auto.key) && dots$auto.key :
> > invalid 'y' type in 'x && y'
> >
> > All the best,
> >
> > Renaud
> >
> >
> > Le 16/06/2011 12:34, Oscar Perpiñan Lamigueiro a écrit :
> >> Hello,
> >>
> >> Following the example of Edzer, you can supply a list to auto.key
> >> (instead of only the TRUE value) with a replacement for some
> >> values:
> >>
> >> xyplot(a~b,data.frame(a=1:3,b=1:3,c=1:3),groups=c,auto.key=list(cex=3))
> >>
> >> Bye,
> >>
> >> Oscar.
> >>
> >
>
More information about the R-sig-Geo
mailing list