View source: R/compose-sandwich.R
compose_sandwich | R Documentation |
This guide composition has a middle guide flanked by two parallel guides.
compose_sandwich(
key = key_auto(),
middle = gizmo_barcap(),
text = "none",
opposite = "none",
args = list(),
complete = TRUE,
theme = NULL,
theme_defaults = list(),
reverse = FALSE,
order = 0,
title = waiver(),
position = waiver(),
available_aes = NULL
)
key |
A standard key specification. The key is shared
among all guides that have |
middle |
Guide to use as the middle guide. Each guide can be specified as one of the following:
|
text , opposite |
Guides to use at the |
args |
A |
complete |
A |
theme |
A |
theme_defaults |
A |
reverse |
A |
order |
A positive |
title |
A |
position |
Where this guide should be drawn: one of |
available_aes |
A |
The sandwich composition is effectively the same as a crux composition lacking two opposing arms.
A <ComposeSandwich>
guide object.
Other composition:
compose_crux()
,
compose_ontop()
,
compose_stack()
,
guide-composition
# A standard plot with a sandwich guide
ggplot(mpg, aes(displ, hwy)) +
geom_point(aes(colour = cty)) +
guides(colour = compose_sandwich(
middle = "colourbar",
text = "axis_base",
opposite = primitive_bracket(key = key_range_manual(
start = c(10, 20), end = c(25, 30), name = c("A", "B")
))
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.