besthr_plot_config: Create a besthr plot configuration

View source: R/plot-config.R

besthr_plot_configR Documentation

Create a besthr plot configuration

Description

Creates a configuration object that controls the appearance and behavior of besthr plots. All parameters have defaults that reproduce the original besthr appearance for backward compatibility.

Usage

besthr_plot_config(
  panel_widths = c(1, 1),
  panel_spacing = grid::unit(0.5, "cm"),
  y_limits = NULL,
  y_expand = 0.05,
  point_size_range = c(2, 8),
  point_alpha = 0.8,
  mean_line_type = 3,
  mean_line_width = 1,
  density_alpha = 0.7,
  density_style = "points",
  theme_style = "modern",
  color_palette = "okabe_ito"
)

Arguments

panel_widths

Numeric vector of relative panel widths for patchwork layout.

panel_spacing

A grid unit specifying spacing between panels.

y_limits

Numeric vector of length 2 for y-axis limits, or NULL for auto.

y_expand

Numeric giving proportional expansion of y-axis limits.

point_size_range

Numeric vector of length 2 for min/max point sizes.

point_alpha

Numeric between 0 and 1 for point transparency.

mean_line_type

Line type for mean indicator lines.

mean_line_width

Line width for mean indicator lines.

density_alpha

Numeric between 0 and 1 for density plot transparency.

density_style

Character: "points" (default, jittered bootstrap points), "gradient" (density with CI shading), or "solid" (single color density).

theme_style

Character: "classic" or "modern".

color_palette

Character: "default", "okabe_ito", or "viridis".

Value

An object of class "besthr_plot_config" containing all plot settings.

Examples

cfg <- besthr_plot_config()
cfg <- besthr_plot_config(panel_widths = c(2, 1), theme_style = "modern")


besthr documentation built on March 18, 2026, 5:08 p.m.