Learn R Programming

circumplex (version 2.0.1)

scale_x_circumplex: Angle-labeled x-axis scale for circumplex plots

Description

A ggplot2 continuous position scale for the angle axis of a linear circumplex plot, such as the score-by-angle curve drawn by ssm_plot_curve(). It places axis breaks at the circumplex scale angles and labels them, by default, with their angular position in degrees. Custom text labels or a circumplex_instrument can be supplied instead, using the same conventions as ggcircumplex(), so the linear axis and the circular canvas label their scales consistently.

Usage

scale_x_circumplex(angles = octants(), labels = NULL, instrument = NULL, ...)

Value

A ggplot2 scale object that can be added to a plot with +.

Arguments

angles

Optional. A numeric vector of the angular position (in degrees) of each circumplex scale (default = octants()). Ignored if instrument is supplied.

labels

Optional. Either NULL or a character vector of axis labels, one per angle and in the same order (default = NULL, which labels each break with its angle in degrees, or with the instrument's scale abbreviations when instrument is supplied).

instrument

Optional. Either NULL or a circumplex_instrument object (see instrument()) from which to take the scale angles and (unless labels is given) abbreviations (default = NULL).

...

Additional arguments passed to ggplot2::scale_x_continuous(), such as name or limits.

See Also

Other circumplex layers: coord_circumplex(), geom_ssm_arc(), geom_ssm_path(), geom_ssm_point(), ggcircumplex(), theme_circumplex()

Examples

Run this code
# Degree-labeled angle axis
scale_x_circumplex(octants())

# Label the axis with an instrument's scale abbreviations
scale_x_circumplex(instrument = csip)

Run the code above in your browser using DataLab