View source: R/guide-axis-stack.R
guide_axis_stack | R Documentation |
This guide can stack other position guides that represent position scales, like those created with scale_(x|y)_continuous() and scale_(x|y)_discrete().
guide_axis_stack(
first = "axis",
...,
title = waiver(),
theme = NULL,
spacing = NULL,
order = 0,
position = waiver()
)
first |
A position guide given as one of the following:
|
... |
Additional guides to stack given in the same manner as |
title |
A character string or expression indicating a title of guide.
If |
theme |
A |
spacing |
A |
order |
A positive |
position |
Where this guide should be drawn: one of top, bottom, left, or right. |
The first
guide will be placed closest to the panel and any subsequent
guides provided through ...
will follow in the given order.
#' # A standard plot
p <- ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme(axis.line = element_line())
# A normal axis first, then a capped axis
p + guides(x = guide_axis_stack("axis", guide_axis(cap = "both")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.