Re: [R] how to make auto.key to produce a legend that uses line pattern (rather than data point) as labels?

From: Markus Gesmann <Markus.Gesmann_at_libero.uk.com>
Date: Wed, 25 Jun 2008 09:36:43 +0100

Hi Mark,

# With auto.key you can specify in a list what kind of graphical output you would like to see in your legend, e.g.

 require(lattice)
 mydata <- data.frame(x=1:4,y=1:4, g=c("a","a","b","b"))  xyplot(y~x, groups=g, data=mydata,

                                t="l", auto.key=list(lines=TRUE, points=FALSE))

# See as well the documentation for auto.key and key under ?xyplot

# As an alternative you might want to use simpleKey
?simpleKey
 xyplot(y~x, groups=g,data=mydata, t="l",

        key=simpleKey(text=levels(mydata$g),lines=TRUE, points=FALSE))

Regards,

Markus

Markus Gesmann Associate DirectorLibero Ventures Ltd, One Broadgate, London EC2M 2QS tel: +44 (0)207 826 9080 dir: +44 (0)207 826 9085fax: +44 (0)207 826 9090 www.libero.uk.com

A Lehman Brothers Company

AUTHORISED AND REGULATED BY THE FINANCIAL SERVICES AUTHORITY -----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of Mark Farnell Sent: 24 June 2008 23:46
To: r-help_at_r-project.org
Subject: [R] how to make auto.key to produce a legend that uses line pattern (rather than data point) as labels?

Hi!

I am working on a line graph under xyplot. what command should I feed to auto.key so that it uses the line pattern of series as labels?

Also where can I find doc about all options that I can feed to auto.key?

Thanks!

Mark



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.

This message is intended for the personal and confidential use for the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction or as an official statement of Libero Ventures Ltd. Email transmissions cannot be guaranteed to be secure or error-free. Therefore we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.



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. Received on Wed 25 Jun 2008 - 08:41:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 25 Jun 2008 - 10:31:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive