View source: R/default_placeholders.R
default_label | R Documentation |
These functions generate placeholder values.
default_label()
can be used as a named argument in uses_labels()
to check that a label matches the result of get_default_labels()
with that name.
default_param()
can be used as a named argument in uses_geom_params()
to check that a parameter matched the result of get_default_params()
with that name.
default_label()
default_param()
A placeholder value to be used within uses_labels()
or uses_geom_params()
.
require(ggplot2)
p <- ggplot(data = mpg, mapping = aes(x = displ, y = hwy, color = trans)) +
geom_smooth(se = FALSE) +
labs(title = "My plot", x = "Weight", y = "MPG")
uses_labels(p, x = default_label(), color = default_label())
uses_geom_params(p, "smooth", size = default_param(), se = default_param())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.