Hello R-helpers,

I'm trying to customize a graphic in lattice using the 'legend' argument to add 
labels on my plot but in the process I'm losing the legend drawn by 'auto.key', 
despite the fact that I'm actually not sticking these on the same sides of the 
graphic. I worked up a quick and simple example with the iris data :

### here's the basic graph
xyplot(Sepal.Length+Sepal.Width~Petal.Length+Petal.Width,data=iris,groups=Species,auto.key=list(space="right"))

### now I try to add a 'legend' argument :
xyplot(Sepal.Length+Sepal.Width~Petal.Length+Petal.Width,data=iris,groups=Species,auto.key=list(space="right"),legend=list(bottom=list(fun=grid.text,args=list(label="youpi
 !"))))

### and sadly the my initial legend has disappeared...


Any pointers ?
Many thanks in advance for your help

David Gouache
ARVALIS - Institut du Végétal
Service Génétique Physiologie et Protection des Plantes
IBP - Université Paris Sud
Rue de Noetzlin - Bât. 630
91405 - ORSAY CEDEX (Adresse Postale)
91190 - GIF SUR YVETTE (Adresse GPS, livraison)
Tél : +33.(0)1.69.93.85.60
Port : +33.(0)6.86.08.94.32
Fax : +33.(0)1.69.93.85.69


        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to