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,
...
)
a ggplot object
base text size
how to name scale. Default inherits from variable name.
either none, full color, or black and white
which aesthetics to modify with col
color lightness - 0 to 100
between 0 and 1. used in greyscale only. smaller numbers are lighter
between 0 and 1, greater than greystart.
which axes are continuous and should be modified by this function
number of axis ticks
vector of axis breaks.
will override n_x_ticks
and/or n_y_ticks
if provided.
vector of axis limits, or NULL, which sets limits automatically
transformations for the axes. See scale_continuous
for details.
Padding around data. See scale_continuous
for details.
The default behavior in ggplot2 is expansion(0.05)
. See expansion
for how to modify this.
text size for plot facet labels
further arguments to plot.
This is not used by dampack
but required for generic consistency.
a ggplot2
plot updated with a common aesthetic