Re: [R] change plotting symbol for groups in trellis graph

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Tue 30 Jan 2007 - 21:55:12 GMT

Try this:

library(lattice)
dotplot(variety ~ yield | site, data = barley, groups = year,

             auto.key = list(space = "right"),
             xlab = "Barley Yield (bushels/acre) ",
             aspect=0.5, layout = c(1,6), ylab=NULL,
             par.settings = list(superpose.symbol = list(pch = c(19, 21))))



On 1/30/07, Tom Boonen <tom.boonen.maiden@gmail.com> wrote:
> Hi,
>
> how can I change the plotting symbol for the groups in a trellis panel dotplot.
>
> My graph is similar to:
>
> library(trellis)
> dotplot(variety ~ yield | site, data = barley, groups = year,
> key = simpleKey(levels(barley$year), space = "right"),
> xlab = "Barley Yield (bushels/acre) ",
> aspect=0.5, layout = c(1,6), ylab=NULL)
>
> I'd like to plot the different years with different symbols (eg. one
> with pch=19 the other with pch=21 or so). Thank you very much for your
> help.
>
> Tom
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>



R-help@stat.math.ethz.ch 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 Jan 31 08:59:41 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 30 Jan 2007 - 22:30:26 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.