Hi, I can't find a simple command to switch the plot colors from paper to presentation formats. Has anyone defined styles that can be easily applied in one command? It would be nice to have a command for papers, using ps or eps outputs, that has a white background and colors that will print nicely on that. On the other hand, it would be nice to have exactly the same plot for a presentation on a black background. A function to flip all the colors to suit the presentation format would be ideal. What is the best way to go about this using R? Thanks, Darren D.L. Weber, Ph.D. UCSF Dept. of Radiology [[alternative HTML version deleted]]
On 3/4/06, Darren Weber <darrenleeweber at gmail.com> wrote:> Hi, > > I can't find a simple command to switch the plot colors from paper to > presentation formats. Has anyone defined styles that can be easily applied > in one command? > > It would be nice to have a command for papers, using ps or eps outputs, that > has a white background and colors that will print nicely on that. On the > other hand, it would be nice to have exactly the same plot for a > presentation on a black background. A function to flip all the colors to > suit the presentation format would be ideal. > > What is the best way to go about this using R?Trellis graphics (i.e. the lattice package) supports this idea; e.g. xyplot(lat ~ long, quakes) will use different color schemes on jpeg(), pdf() and postscript(). See ?trellis.device for details. Deepayan
Darren Weber wrote:> Hi, > > I can't find a simple command to switch the plot colors from paper to > presentation formats. Has anyone defined styles that can be easily applied > in one command? > > It would be nice to have a command for papers, using ps or eps outputs, that > has a white background and colors that will print nicely on that. On the > other hand, it would be nice to have exactly the same plot for a > presentation on a black background. A function to flip all the colors to > suit the presentation format would be ideal. > > What is the best way to go about this using R?Beside what Deepayan told us about lattice, for standard graphics I am using default background (transparent) and set par(fg="white", col.main="white", col.axis="white", col.lab="white") Uwe Ligges> Thanks, Darren > > D.L. Weber, Ph.D. > UCSF Dept. of Radiology > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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