[R] Lattice legend

Felix Andrews felix at nfrac.org
Wed Jun 23 05:58:30 CEST 2010


2010/6/23 Seth W Bigelow <sbigelow at fs.fed.us>:
>> "with(alt.data[[which.packet()[1]]]" statements. It all graphs out
>> beautifully, but none of the usual tricks to get the proper legend to
> plot
>> are working, i.e., using auto.key, key, etc.

You haven't told us exactly what you mean by "proper legend", but it
is generally a good idea to use the 'par.settings' argument with
'auto.key'. Try:

sup.sym$cex <- 1.5

graf <- xyplot(t~CC|dep,d, groups=tx, alt.data=s,
       #pch = sup.sym$pch, ## omit this; instead:
       par.settings = list(superpose.symbol = sup.sym),
       #cex=1.5,
       ## (other stuff)
       panel = mypanel,
       auto.key = list(
               text = c("heavy thin","light thin", "control"," group"),
               columns=2
       ),
       aspect="xy")
graf






>> One message I keep getting is
>>
>> Error in key[[i]][[1]] <- NULL :  more elements supplied than there are
> to
>> replace
>>
>>
>>
>> Any suggestions will be appreciated
>>
>> --Seth
>>
>>
>> Dr. Seth  W. Bigelow
>> Biologist, USDA-FS Pacific Southwest Research Station
>> 1731 Research Park Drive, Davis California
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
>
>
> --
> Felix Andrews / 安福立
> Integrated Catchment Assessment and Management (iCAM) Centre
> Fenner School of Environment and Society [Bldg 48a]
> The Australian National University
> Canberra ACT 0200 Australia
> M: +61 410 400 963
> T: + 61 2 6125 4670
> E: felix.andrews at anu.edu.au
> CRICOS Provider No. 00120C
> --
> http://www.neurofractal.org/felix/
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>



-- 
Felix Andrews / 安福立
Integrated Catchment Assessment and Management (iCAM) Centre
Fenner School of Environment and Society [Bldg 48a]
The Australian National University
Canberra ACT 0200 Australia
M: +61 410 400 963
T: + 61 2 6125 4670
E: felix.andrews at anu.edu.au
CRICOS Provider No. 00120C
-- 
http://www.neurofractal.org/felix/



More information about the R-help mailing list