Skip to contents

Generic line plot builder

Usage

build_line_plot(
  data,
  x_var,
  y_var,
  color_var,
  linetype_var = NULL,
  facet_formula,
  title,
  subtitle = "",
  y_lab,
  color_lab = "Method",
  linetype_lab = "neg:pos",
  hline = NULL,
  hline_style = "dotted",
  x_breaks = NULL,
  y_limits = NULL,
  use_aggregate_theme = FALSE,
  point_size = 1.5,
  line_width = 1
)

Arguments

data

Data frame

x_var

X variable (unquoted)

y_var

Y variable (unquoted)

color_var

Color variable (unquoted)

linetype_var

Optional linetype variable (unquoted), NULL for none

facet_formula

Facet formula (e.g., q0_lab ~ q1_lab)

title

Plot title

subtitle

Plot subtitle

y_lab

Y-axis label

color_lab

Color legend label

linetype_lab

Linetype legend label (if applicable)

hline

Optional horizontal line y-intercept

hline_style

"dashed" or "dotted"

x_breaks

X-axis breaks

y_limits

Optional y-axis limits (c(min, max))

use_aggregate_theme

Use larger theme for aggregate plots

point_size

Point size

line_width

Line width

Value

A ggplot object