Hi everyone, Does anyone know how to get "black and white theme" (grey scale,, I would say) graphs using lattice or ggplot2, as it is shown in this webpage: http://lmdvr.r-forge.r-project.org/figures/figures.html? I am using Sweave, and I cannot get that color configuration. I have added the following option: trellis.device(color=FALSE) but I got a pdf file with color graphs. Thank in advance. -- Sebasti?n Daza sebastian.daza at gmail.com
On Feb 2, 2011, at 10:26 AM, Sebasti?n Daza wrote:> Hi everyone, > Does anyone know how to get "black and white theme" (grey scale,, I > would say) graphs using lattice or ggplot2, as it is shown in this > webpage: http://lmdvr.r-forge.r-project.org/figures/figures.html? > > I am using Sweave, and I cannot get that color configuration. > I have added the following option: trellis.device(color=FALSE) but I > got a pdf file with color graphs.Maybe you should use postscript as a device for which the default is for color=FALSE. ?trellis.device> > Thank in advance. > -- > Sebasti?n Daza > sebastian.daza at gmail.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.David Winsemius, MD West Hartford, CT
Well, if you're using pdf, you could set the gray option there, e.g., pdf.options(colormodel="gray") Or you could just use a gray theme. In ggplot2 use + theme_gray() Not sure in lattice, but I think it also has a themeing system. Best, Ista 2011/2/2 Sebasti?n Daza <sebastian.daza at gmail.com>:> Hi everyone, > Does anyone know how to get "black and white theme" (grey scale,, I would > say) graphs using lattice or ggplot2, as it is shown in this webpage: > http://lmdvr.r-forge.r-project.org/figures/figures.html? > > I am using Sweave, and I cannot get that color configuration. > I have added the following option: trellis.device(color=FALSE) but I got a > pdf file with color graphs. > > Thank in advance. > -- > Sebasti?n Daza > sebastian.daza at gmail.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. >-- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org