When I specify pch = 19 for a scatter plot the points are filled circles. Deapite reading ?points and trial-and-error experimentation I have not found how to have the legend symbols (now open circles) filled. An example command is: xyplot(pct.quant ~ sampdate, data = ffg.st, groups = func_feed_grp, type 'p', pch = 19, key = simpleKey(text = levels(ffg.st$func_feed_grp), space 'right', points = T, lines = F),par.settings = list(superpose.points list(col = rainbow(7)), superpose.lines = list(col = rainbow(7))), main 'Functional Feeding Groups (Individuals)', xlab = 'Year', ylab = 'Proportion of Individuals') Please pass me a pointer on how to fill the legend points. TIA, Rich
put the pch into the par.settings On Thu, Oct 17, 2013 at 11:17 AM, Rich Shepard <rshepard at appl-ecosys.com> wrote:> When I specify pch = 19 for a scatter plot the points are filled circles. > Deapite reading ?points and trial-and-error experimentation I have not found > how to have the legend symbols (now open circles) filled. > > An example command is: > > xyplot(pct.quant ~ sampdate, data = ffg.st, groups = func_feed_grp, type > 'p', pch = 19, key = simpleKey(text = levels(ffg.st$func_feed_grp), space > 'right', points = T, lines = F),par.settings = list(superpose.points > list(col = rainbow(7)), superpose.lines = list(col = rainbow(7))), main > 'Functional Feeding Groups (Individuals)', xlab = 'Year', ylab = 'Proportion > of Individuals') > > Please pass me a pointer on how to fill the legend points. > > TIA, > > Rich > > ______________________________________________ > 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.
> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Rich Shepard > Subject: [R] Lattice xyplot: Fill Legend Points > > When I specify pch = 19 for a scatter plot the points are filled > circles. > Deapite reading ?points and trial-and-error experimentation I have not > found > how to have the legend symbols (now open circles) filled. >Using trellis.par.set seems more successful than specifying par.settings in the call, however much I'd prefer to avoid relying on globals. Example: ss<-trellis.par.get("superpose.symbol") ss$pch=rep(19,7) ss$col=rainbow(7) trellis.par.set(superpose.symbol=ss) #Example from xyplot 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) S Ellison ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}