| plot_fn | R Documentation |
plot_fn is a function that uses parameters for plotting a plot.
plot_fn(
x = NA,
y = 1,
A = TRUE,
B = FALSE,
C = TRUE,
D = FALSE,
E = FALSE,
F = FALSE,
f = c(rev(pal_seeblau), "white", pal_pinky),
g = "white"
)
x |
Numeric (integer > 0).
Default: |
y |
Numeric (double).
Default: |
A |
Boolean.
Default: |
B |
Boolean.
Default: |
C |
Boolean.
Default: |
D |
Boolean.
Default: |
E |
Boolean.
Default: |
F |
Boolean.
Default: |
f |
A color palette (as a vector).
Default: |
g |
A color (e.g., a color name, as a character).
Default: |
plot_fn is deliberately kept cryptic and obscure to illustrate
how function parameters can be explored.
plot_fn 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_fn currently requires pal_seeblau and
pal_pinky (from the unikn package) for its default colors.
plot_fun for a related function;
pal_ds4psy for a color palette.
Other plot functions:
plot_charmap(),
plot_chars(),
plot_fun(),
plot_n(),
plot_text(),
plot_tiles(),
theme_clean(),
theme_ds4psy(),
theme_empty()
# Basics:
plot_fn()
# Exploring options:
plot_fn(x = 2, A = TRUE)
plot_fn(x = 3, A = FALSE, E = TRUE)
plot_fn(x = 4, A = TRUE, B = TRUE, D = TRUE)
plot_fn(x = 5, A = FALSE, B = TRUE, E = TRUE, f = c("black", "white", "gold"))
plot_fn(x = 7, A = TRUE, B = TRUE, F = TRUE, f = c("steelblue", "white", "forestgreen"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.