compose_crux | R Documentation |
This guide composition has a central guide optionally surrounded by other guides on all four sides.
compose_crux(
key = NULL,
centre = "none",
left = "none",
right = "none",
top = "none",
bottom = "none",
args = list(),
complete = FALSE,
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 |
centre , left , right , top , bottom |
Guides to use in composition per position. Each guide can be specified as one of the following:
|
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 |
A <ComposeCrux>
guide object.
Other composition:
compose_ontop()
,
compose_sandwich()
,
compose_stack()
,
guide-composition
# Roughly recreating a colour bar with extra text on top and bottom
crux <- compose_crux(
centre = gizmo_barcap(), left = "axis_base",
right = "axis_base",
top = primitive_title("A lot"),
bottom = primitive_title("A little")
)
ggplot(mpg, aes(displ, hwy)) +
geom_point(aes(colour = cty)) +
guides(colour = crux)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.