scale_x_symmetric: Symmetric x continuous scale

View source: R/scale_symmetric.R

scale_x_symmetricR Documentation

Symmetric x continuous scale

Description

Symmetric x continuous scale

Usage

scale_x_symmetric(
  ...,
  data = NULL,
  x = NULL,
  symmetric = TRUE,
  breaks = NULL,
  breaks_n = 6,
  expand = NULL,
  expand_limits = NULL,
  labels = NULL,
  position = "bottom",
  sec_axis = ggplot2::waiver(),
  transform = "identity"
)

Arguments

...

Provided to force user argument naming etc.

data

A data frame or tibble.

x

An unquoted variable.

symmetric

TRUE or FALSE of whether a symmetric scale.

breaks

A ⁠scales::breaks_*⁠ function (e.g. ⁠scales::breaks_*()⁠), or a vector of breaks.

breaks_n

If breaks = NULL, the desired number of breaks.

expand

Padding to the limits with the ggplot2::expansion() function, or a vector of length 2 (e.g. c(0, 0)).

expand_limits

Any values that the limits should encompass (e.g. 0).

labels

A function that takes the breaks as inputs (e.g. ⁠\(x) stringr::str_to_sentence(x)⁠ or ⁠scales::label_*()⁠), or a vector of labels.

position

The position of the axis (i.e. "left", "right", "bottom" or "top").

sec_axis

A secondary axis created with ggplot2::sec_axis() or ggplot2::dup_axis().

transform

A transformation object (e.g. scales::transform_log10()) or character string of this minus the transform_ prefix (e.g. "log10").

Value

A ggplot2 continuous x scale.


davidhodge931/ggblanket documentation built on Dec. 22, 2024, 9:10 p.m.