Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Stacked axis guides

Source:R/guide-axis-stack.R
guide_axis_stack.Rd

This guide can stack other position guides that represent position scales,like those created withscale_(x|y)_continuous() andscale_(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:

  • A string, for example"axis".

  • A call to a guide function, for exampleguide_axis().

...

Additional guides to stack given in the same manner asfirst.

title

A character string or expression indicating a title of guide.IfNULL, the title is not shown. By default(waiver()), the name of the scale object or the namespecified inlabs() is used for the title.

theme

Atheme object to style the guide individually ordifferently from the plot's theme settings. Thetheme argument in theguide partially overrides, and is combined with, the plot's theme.

spacing

Aunit() objects that determines how far separate guides arespaced apart.

order

A positiveinteger of 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")))

[8]ページ先頭

©2009-2025 Movatter.jp