[R] Changing grid defaults

ilai keren at math.montana.edu
Fri Apr 6 18:30:36 CEST 2012


You might want to check out package {tikzDevice} and it's
documentation. In essence you turn your R plots to tikz-pgf so they
can be naturally incorporated into a beamer presentation. Colors, bg,
fonts etc. can now be controlled in your main latex doc. I find it
much more convenient, and nicer when the plot annotations make use of
the same latex font rather than e.g. plotmath. Note, for grid graphics
you'll need to use print(yourplot) to the device.

Cheers

On Fri, Apr 6, 2012 at 8:43 AM, Brett Presnell <presnell at stat.ufl.edu> wrote:
>
> 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.
>
> ______________________________________________
> 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.



More information about the R-help mailing list