[R] plots - paper vs presentation colors
deepayan.sarkar at gmail.com
Sun Mar 5 04:06:02 CET 2006
On 3/4/06, Darren Weber <darrenleeweber at gmail.com> wrote:
> 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.
More information about the R-help