Skip to contents

Ridge Plot Visualization

Usage

jggridges(
  data,
  x_var,
  y_var,
  color_var = NULL,
  facet_var = NULL,
  plot_type = "density_ridges",
  scale = 1,
  rel_min_height = 0.01,
  alpha = 0.8,
  bandwidth = "nrd0",
  quantile_lines = FALSE,
  quantiles = "0.25, 0.5, 0.75",
  jittered_points = FALSE,
  point_alpha = 0.5,
  color_palette = "viridis",
  reverse_order = FALSE,
  expand_panel = TRUE,
  theme_style = "theme_ridges",
  x_label = "",
  y_label = "",
  plot_title = "",
  plot_subtitle = "",
  show_mean = FALSE,
  show_statistics = TRUE,
  show_interpretation = TRUE
)

Arguments

data

R object to use

x_var

Continuous variable for distribution visualization

y_var

Grouping variable for separate ridges

color_var

Variable for color mapping

facet_var

Variable for facetting plots

plot_type

Type of ridge plot to create

scale

Scaling factor for ridge heights

rel_min_height

Minimum height of ridges relative to overall scale

alpha

Transparency level for ridges

bandwidth

Bandwidth selection method for density estimation

quantile_lines

Add quantile lines to ridges

quantiles

Quantiles to display as lines (comma-separated)

jittered_points

Add jittered points below ridges

point_alpha

Transparency for jittered points

color_palette

Color palette for ridges

reverse_order

Reverse the order of groups on Y axis

expand_panel

Remove space around plot area

theme_style

ggplot2 theme style

x_label

Custom label for X axis

y_label

Custom label for Y axis

plot_title

Title for the plot

plot_subtitle

Subtitle for the plot

show_mean

Add vertical lines at group means

show_statistics

Display summary statistics

show_interpretation

Display result interpretation

Value

A results object containing:

results$instructionsa html
results$plotan image
results$statisticsa html
results$interpretationa html