plot_fun is a function that provides options for plotting a plot.
Usage
plot_fun(
a = NA,
b = TRUE,
c = TRUE,
d = 1,
e = FALSE,
f = FALSE,
g = FALSE,
c1 = c(rev(pal_seeblau), "white", pal_grau, "black", Bordeaux),
c2 = "black"
)
Arguments
a
A (natural) number.
Default: a = NA.
b
Boolean.
Default: b = TRUE.
c
Boolean.
Default: c = TRUE.
d
A (decimal) number.
Default: d = 1.0.
e
Boolean.
Default: e = FALSE.
f
Boolean.
Default: f = FALSE.
g
Boolean.
Default: g = FALSE.
c1
A color palette (e.g., as a vector).
Default: c1 = c(rev(pal_seeblau), "white", pal_grau, "black", Bordeaux).
Note: Using colors of the unikn package by default.
c2
A color (e.g., as a character).
Default: c2 = "black".
Details
plot_fun is deliberately kept cryptic and obscure to illustrate
how function parameters can be explored.
plot_fun also shows that brevity in argument names should not
come at the expense of clarity. In fact, transparent argument names
are absolutely essential for understanding and using a function.
plot_fun currently requires pal_seeblau, pal_grau, and
Bordeaux (from the unikn package) for its default colors.
See Also
plot_fn for a related function;
pal_ds4psy for color palette.