[R] identifying groups in xyplot

Weidong Gu anopheles123 at gmail.com
Fri Oct 21 00:51:58 CEST 2011


Hi,

Just include pch=c(1,2,3), col=c('red','blue','yellow') or your
choices in xyplot

Weidong Gu

On Thu, Oct 20, 2011 at 2:15 PM, wisc_maier <cmaier2 at wisc.edu> wrote:
> There have been posts in the past regarding similar questions, but many of
> them looked dated. I am using xyplot to show variability within my
> replicates, and so far so good, but I would like to refine the plot. I've
> used the code below to graph my response variable against year (coded as a
> factor with three levels 2009, 2010, 2011). Each replicate is in a different
> panel (|field). My group variable is a factor (Management) with three
> levels. I would like to define the symbol and color of each factor level.
>
> xyplot(Hill.s.diversity ~ Year| Field, group=Management,
> layout=c(2,3),
> main="Hills evenness by Management Block, June 2009-2011",
> ylab="Hills evenness",
> data=summer_pr_avg)
>
> --
> View this message in context: http://r.789695.n4.nabble.com/identifying-groups-in-xyplot-tp3922985p3922985.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>



More information about the R-help mailing list