Description Usage Arguments Value
View source: R/add_common_aes.R
Adds aesthetics to all plots to reduce code duplication
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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, n_y_ticks |
number of axis ticks |
xbreaks, ybreaks |
vector of axis breaks.
will override |
xlim, ylim |
vector of axis limits, or NULL, which sets limits automatically |
xtrans, ytrans |
transformations for the axes. See |
xexpand, 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.