[R] Changing grid defaults

Brett Presnell presnell at stat.ufl.edu
Fri Apr 6 16:43:53 CEST 2012


I'm trying to use the vcd package to produce mosaic plots for my class
notes, written in Sweave and using the LaTeX's beamer document class.
For projecting the notes in class, I use a dark background with light
foreground colors.  It's easy enough to change the defaults for R's
standard graphics to match my color scheme (using the fg, col.axis,
col.lab, col.main, and col.sub parameter settings), but I can't figure
out how to do this with grid/strucplot/vcd.

>From my experiments, I think that I might eventually figure out how to
change the colors of all the text in the mosaic plots to what I want
using arguments like 'gp_args = list(gp_labels = gpar(col = "yellow")'
and 'gp_varnames = gpar(col = "yellow")' (although I still haven't
figured out how to changed the color of the text on the legends), but
this is obviously not what I need.  I have been reading all the
documentation I can find, but I still haven't figured this out, so an
answer accompanied by a reference to some line or the other in some
piece of documentation would be greatly appreciated.



More information about the R-help mailing list