Learn R Programming

ggblanket (version 10.0.0)

scale_y_symmetric: Symmetric y continuous scale

Description

Symmetric y continuous scale

Usage

scale_y_symmetric(
  ...,
  data = NULL,
  y = NULL,
  symmetric = TRUE,
  breaks = NULL,
  breaks_n = 6,
  expand = NULL,
  expand_limits = NULL,
  labels = NULL,
  position = "left",
  sec_axis = ggplot2::waiver(),
  transform = "identity"
)

Value

A ggplot2 continuous y scale.

Arguments

...

Provided to force user argument naming etc.

data

A data frame or tibble.

y

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").