Adjust a figure.

adjust(type, margin = NULL, dodge_by = NULL)

Arguments

type

A vector of types of adjustement to apply to the figure, see the "types" section below for valid values.

margin

Margin, between 0 and 1.

dodge_by

Bare column name to use as group for dodge.

Types

Valid values for the type argument.

  • stack

  • dodge

  • jitter

  • symmetric

Examples

df <- data.frame(
  x = c(letters, letters),
  y = runif(52),
  grp = rep(c("A", "Z"), each = 2)
)

g2(df, asp(x, y, color = grp)) %>%
  fig_interval(adjust("stack"))