View source: R/primitive-title.R
primitive_title | R Documentation |
This function constructs a title guide primitive.
primitive_title(
title = waiver(),
angle = waiver(),
theme = NULL,
position = waiver()
)
title |
A |
angle |
A specification for the text angle. Compared to setting the
|
theme |
A |
position |
A |
A <PrimitiveTitle>
primitive guide that can be used inside other
guides.
Below are the theme options that determine the styling of this guide, which may differ depending on whether the guide is used in an axis or in a legend context.
axis.title.{x/y}.{position}
an <element_text>
for the title display.
legend.title
an <element_text>
for the title display.
Other primitives:
primitive_box()
,
primitive_bracket()
,
primitive_fence()
,
primitive_labels()
,
primitive_line()
,
primitive_segments()
,
primitive_spacer()
,
primitive_ticks()
# A standard plot
p <- ggplot(mpg, aes(displ, hwy)) +
geom_point()
# Adding as secondary guides
p + guides(
x.sec = primitive_title("Horizontal Title"),
y.sec = primitive_title(c("along vertical", "Multiple tiles"))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.