guide_axis_stack {ggplot2} | R Documentation |
Stacked axis guides
Description
This guide can stack other position guides that represent position scales, like those created with scale_(x|y)_continuous() and scale_(x|y)_discrete().
Usage
guide_axis_stack(
first = "axis",
...,
title = waiver(),
theme = NULL,
spacing = NULL,
order = 0,
position = waiver()
)
Arguments
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. |
Details
The first
guide will be placed closest to the panel and any subsequent
guides provided through ...
will follow in the given order.
Examples
#' # 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")))