This guide can stack other position guides that represent position scales,like those created withscale_(x|y)_continuous() andscale_(x|y)_discrete().
Arguments
- first
A position guide given as one of the following:
A string, for example
"axis".A call to a guide function, for example
guide_axis().
- ...
Additional guides to stack given in the same manner as
first.- title
A character string or expression indicating a title of guide.If
NULL, the title is not shown. By default(waiver()), the name of the scale object or the namespecified inlabs()is used for the title.- theme
A
themeobject to style the guide individually ordifferently from the plot's theme settings. Thethemeargument in theguide partially overrides, and is combined with, the plot's theme.- spacing
A
unit()objects that determines how far separate guides arespaced apart.- order
A positive
integerof length 1 that specifies the order ofthis guide among multiple guides. This controls in which order guides aremerged if there are multiple guides for the same position. If 0 (default),the order is determined by a secret algorithm.- position
Where this guide should be drawn: one of top, bottom,left, or right.
Details
Thefirst guide will be placed closest to the panel and any subsequentguides provided through... will follow in the given order.
Examples
# A standard plotp<-ggplot(mpg,aes(displ,hwy))+geom_point()+theme(axis.line=element_line())# A normal axis first, then a capped axisp+guides(x=guide_axis_stack("axis",guide_axis(cap="both")))
