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

lancelot renaud.lancelot at cirad.fr
Wed Jun 15 09:06:27 CEST 2011


Thank you Edzer, it works fine with spplot.

Renaud

Le 14/06/2011 23:52, Edzer Pebesma a écrit :
> 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
>

-- 
Renaud Lancelot
EDENext Project, coordinator: http://www.edenext.eu/

CIRAD, UMR15, Campus International de Baillarguet TA A-DIR / B
F34398 Montpellier

Tel.  +33 4 67 59 37 17  -  Fax  +33 4 67 59 37 95
Secr. +33 4 67 59 37 37  - Cell. +33 6 77 52 08 69



More information about the R-sig-Geo mailing list