Re: [R] Darker markers for symbols in lattice
Adding par.settings = list(grid.pars = list(lwd = 3)) to my code which uses simpleKey gives exactly what I want. However, if I use auto.key, I lose all the formatting and get default colors and symbols. I am indebted to Deepayan for once again providing the key (pun intended) to a solution. My figure is a superposed dotplot similar to the barley example. I like to vary the symbols even if I use color as an aid to those with color vision deficiencies and choose my colors with color vision deficiency in mind. Naomi Deepayan Sarkar wrote: > On Mon, Apr 13, 2009 at 9:37 AM, Naomi B. Robbins > wrote: > >> Now that I have the markers the weight I want using lex, I'm having trouble >> making the key >> match the markers. Any suggestions? BTW, I'm using R2.8.1 with Windows >> Vista. >> > > There's no real solution, but for some reason, the following seems to work: > > xyplot(1:10 ~ 1:10, groups = gl(3, 1), auto.key = TRUE, lex = 3, > par.settings = list(grid.pars = list(lwd = 3))) > > -Deepayan > > > / <http://www.nbr-graphs.com/bookframe.html>/ [[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.
Re: [R] Darker markers for symbols in lattice
Now that I have the markers the weight I want using lex, I'm having trouble making the key match the markers. Any suggestions? BTW, I'm using R2.8.1 with Windows Vista. Naomi -- Naomi B. Robbins NBR 11 Christine Court Wayne, NJ 07470 Phone: (973) 694-6009 na...@nbr-graphs.com http://www.nbr-graphs.com <http://www.nbr-graphs.com/> Follow me at http://www.twitter.com/nbrgraphs Author of /Creating More Effective Graphs <http://www.nbr-graphs.com/bookframe.html>/ Deepayan Sarkar wrote: > On Sun, Mar 29, 2009 at 12:35 PM, Naomi B. Robbins > wrote: > >> In lattice, using the command trellis.par.get for superpose.symbol, plot, >> symbol and/or dot.symbol shows that we can specify alpha, cex, col, fill >> (for superpose.symbol and plot.symbol), font, and pch. Trial and error >> shows that the font affects letters but not pch=1 or pch=3 (open circles >> and plus signs.) I want to use open circles and plus signs, keep the colors >> and cex I've specified but make the symbols bolder, much the way a >> higher lwd makes lines bolder. Does anyone know of a library that >> does that or can anyone think of a workaround to make the markers >> stand out better without making them larger? >> > > ?grid::gpar lists 'lex' as a "Multiplier applied to line width", and > that seems to work when supplied as a top-level argument (though not > in the parameter settings): > > xyplot(1:10 ~ 1:10, pch = c(1, 3), cex = 2, lex = 3) > > I'm not sure if 'lwd' should have the same effect (it does in base graphics). > > -Deepayan > > > -- Naomi B. Robbins NBR 11 Christine Court Wayne, NJ 07470 Phone: (973) 694-6009 na...@nbr-graphs.com http://www.nbr-graphs.com <http://www.nbr-graphs.com/> Follow me at http://www.twitter.com/nbrgraphs Author of /Creating More Effective Graphs <http://www.nbr-graphs.com/bookframe.html>/ [[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.
Re: [R] Darker markers for symbols in lattice
Many thanks to Deepayan for providing just what I wanted. I've tried lwd many times and it does not work but lex does the trick. Thanks also to Paul Murrell for his very simple suggestion of using lower case o for an open circle since bold works on letters and to Bert Gunter for suggesting an overplotting technique to try if nothing easier was suggested. Naomi -- Naomi B. Robbins NBR 11 Christine Court Wayne, NJ 07470 Phone: (973) 694-6009 na...@nbr-graphs.com http://www.nbr-graphs.com Author of /Creating More Effective Graphs <http://www.nbr-graphs.com/bookframe.html>/ Deepayan Sarkar wrote: > On Sun, Mar 29, 2009 at 12:35 PM, Naomi B. Robbins > wrote: > >> In lattice, using the command trellis.par.get for superpose.symbol, plot, >> symbol and/or dot.symbol shows that we can specify alpha, cex, col, fill >> (for superpose.symbol and plot.symbol), font, and pch. Trial and error >> shows that the font affects letters but not pch=1 or pch=3 (open circles >> and plus signs.) I want to use open circles and plus signs, keep the colors >> and cex I've specified but make the symbols bolder, much the way a >> higher lwd makes lines bolder. Does anyone know of a library that >> does that or can anyone think of a workaround to make the markers >> stand out better without making them larger? >> > > ?grid::gpar lists 'lex' as a "Multiplier applied to line width", and > that seems to work when supplied as a top-level argument (though not > in the parameter settings): > > xyplot(1:10 ~ 1:10, pch = c(1, 3), cex = 2, lex = 3) > > I'm not sure if 'lwd' should have the same effect (it does in base graphics). > > -Deepayan > > > -- Naomi B. Robbins NBR 11 Christine Court Wayne, NJ 07470 Phone: (973) 694-6009 na...@nbr-graphs.com http://www.nbr-graphs.com Author of /Creating More Effective Graphs <http://www.nbr-graphs.com/bookframe.html>/ [[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.
[R] Darker markers for symbols in lattice
In lattice, using the command trellis.par.get for superpose.symbol, plot, symbol and/or dot.symbol shows that we can specify alpha, cex, col, fill (for superpose.symbol and plot.symbol), font, and pch. Trial and error shows that the font affects letters but not pch=1 or pch=3 (open circles and plus signs.) I want to use open circles and plus signs, keep the colors and cex I've specified but make the symbols bolder, much the way a higher lwd makes lines bolder. Does anyone know of a library that does that or can anyone think of a workaround to make the markers stand out better without making them larger? I'm using R2.8.1 with Windows Vista. Thanks, Naomi -- Naomi B. Robbins NBR 11 Christine Court Wayne, NJ 07470 Phone: (973) 694-6009 na...@nbr-graphs.com http://www.nbr-graphs.com Author of /Creating More Effective Graphs <http://www.nbr-graphs.com/bookframe.html>/ [[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.