side_plot: side_plot

View source: R/side_plot.R

side_plotR Documentation

side_plot

Description

side_plot

Usage

side_plot(
  data,
  x,
  y = "1",
  labels_y = ez_labels,
  size = 11,
  palette = ez_col,
  signif = 3,
  reorder = TRUE,
  rescale_y = 1.25
)

Arguments

data

A data.frame.

x

A named character value. Evaluates to a column.

y

A named character value. Evaluates to a column.

labels_y

label formatting function

size

theme size for use_theme(). Default is 14.

palette

Colour function.

signif

Number of significant digits.

reorder

A character vector specifying the group variables to reorder. Default is c("group", "facet_x", "facet_y").

rescale_y

Rescaling factor for y-axis limits

Examples

side_plot(mtcars, "gear", "1", rescale_y = 4/3)
side_plot(mtcars, "cyl", c("Cars with <120 HP" = "hp < 120"))
side_plot(mtcars, "cyl", c(count = "ifelse(cyl == 4, 1, -1)", "hp <= 120"))
side_plot(mtcars, "cyl", c("hp <= 120", "~ - wt / cyl"), rescale_y = 1.5)
side_plot(mtcars, "cyl", c("1", "-1"))

ezplot documentation built on Nov. 26, 2023, 5:07 p.m.