guide_axis_textpath {geomtextpath}R Documentation

Textpath axis

Description

This is a specialised guide used in coord_radial() to represent the theta position scale.

Usage

guide_axis_textpath(
  title = waiver(),
  halign = "center",
  rich = FALSE,
  minor.ticks = FALSE,
  cap = "none",
  order = 0,
  position = waiver()
)

Arguments

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 name specified in labs() is used for the title.

halign

A character(1) describing how multi-line text should be justified. Can either be "center" (default), "left" or "right".

rich

A logical(1) whether to interpret the text as html/markdown formatted rich text. Default: FALSE. See also the rich text section of the details in geom_textpath().

minor.ticks

Whether to draw the minor ticks (TRUE) or not draw minor ticks (FALSE, default).

cap

A character to cut the axis line back to the last breaks. Can be "none" (default) to draw the axis line along the whole panel, or "upper" and "lower" to draw the axis to the upper or lower break, or "both" to only draw the line in between the most extreme breaks. TRUE and FALSE are shorthand for "both" and "none" respectively.

order

A positive integer of length 1 that specifies the order of this guide among multiple guides. This controls in which order guides are merged 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.

Value

A Guide ggproto object that can be added to a plot through a scale or the guides() function.

Examples

ggplot(mpg, aes(class, displ)) +
  geom_boxplot(staplewidth = 0.5) +
  coord_radial() +
  guides(theta = "axis_textpath")

[Package geomtextpath version 0.1.3 Index]