View source: R/add_common_aes.R
add_common_aes | R Documentation |
Adds aesthetics to all plots to reduce code duplication
add_common_aes(
gplot,
txtsize,
scale_name = waiver(),
col = c("none", "full", "bw"),
col_aes = c("fill", "color"),
lval = 50,
greystart = 0.2,
greyend = 0.8,
continuous = c("none", "x", "y"),
n_x_ticks = 6,
n_y_ticks = 6,
xbreaks = NULL,
ybreaks = NULL,
xlim = NULL,
ylim = NULL,
xtrans = "identity",
ytrans = "identity",
xexpand = waiver(),
yexpand = waiver(),
facet_lab_txtsize = NULL,
...
)
gplot |
a ggplot object |
txtsize |
base text size |
scale_name |
how to name scale. Default inherits from variable name. |
col |
either none, full color, or black and white |
col_aes |
which aesthetics to modify with |
lval |
color lightness - 0 to 100 |
greystart |
between 0 and 1. used in greyscale only. smaller numbers are lighter |
greyend |
between 0 and 1, greater than greystart. |
continuous |
which axes are continuous and should be modified by this function |
n_x_ticks |
number of x-axis ticks |
n_y_ticks |
number of y-axis ticks |
xbreaks |
vector of x-axis breaks.
will override |
ybreaks |
vector of y-axis breaks.
will override |
xlim |
vector of x-axis limits, or NULL, which sets limits automatically |
ylim |
vector of y-axis limits, or NULL, which sets limits automatically |
xtrans |
transformation for the x-axis. See |
ytrans |
transformation for the y-axis. See |
xexpand |
Padding around data. See |
yexpand |
Padding around data. See |
facet_lab_txtsize |
text size for plot facet labels |
... |
further arguments to plot.
This is not used by |
a ggplot2
plot updated with a common aesthetic
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.