.build_options {ggplot} | R Documentation |
Set global options for ggplot.
.build_options(opt)
opt |
list of options to get/set |
These are aliased into every plot object, so that p$grid.col
will
return the default grid colour, unless it has been overriden for a particular
plot object. You can change the global options using the function, or the
options for a specific plot by setting the values directly on the object. See
the examples for more details.
Colour settings:
Strip settings
Legend settings
Other settings:
NULL
to allow
to vary with device size
Hadley Wickham <h.wickham@gmail.com>
ggopt(background.fill = "black", background.color ="white") # all new plots will use this p <- ggpoint(ggplot(tips, smoker ~ sex,aesthetics = list(y = tip, x = total_bill))) p p$background.fill = "white" p p$strip.text.gp <- gpar(col="red", fontsize=8) p$background.colour <- "pink" p$grid.colour <- "green" p$grid.fill <- "blue" p # a very ugly plot! ggopt(background.fill = "white", background.color ="black")