View source: R/compose-ontop.R
compose_ontop | R Documentation |
This guide can place place other guides on top of one another.
compose_ontop(
...,
args = list(),
key = NULL,
title = waiver(),
angle = waiver(),
theme = NULL,
order = 0,
position = waiver(),
available_aes = NULL
)
... |
Guides to stack in composition. Each guide can be specified as one of the following:
|
args |
A |
key |
A standard key specification. The key is shared
among all guides that have |
title |
A |
angle |
A specification for the text angle. Compared to setting the
|
theme |
A |
order |
A positive |
position |
A |
available_aes |
A |
A <ComposeOntop>
composite guide object.
Other composition:
compose_crux()
,
compose_sandwich()
,
compose_stack()
,
guide-composition
# Using the ontop composition to get two types of ticks with different
# lengths
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
guides(x = compose_ontop(
guide_axis_base(
key_manual(c(2, 4, 6)),
theme = theme(
axis.ticks = element_line(colour = "limegreen"),
axis.ticks.length = unit(11, "pt")
)
),
guide_axis_base(
key_manual(c(3, 5, 7)),
theme = theme(
axis.ticks = element_line(colour = "tomato"),
axis.ticks.length = unit(5.5, "pt")
)
)
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.