Skip to contents

Adds a layer with trend lines to a ggplot.

Usage

plot_lines(
  data_plot_lines,
  line_values = c("est_noTrendStart_noComp", "est_noTrendEnd_noComp"),
  line_sig = "sig_Trend_CompCrossDiffWithin",
  plot_settings = plotsettings_lineplot()
)

Arguments

data_plot_lines

data.

line_values

Character vector with two elements. Column names in plot_dat[["plot_lines"]] containing the y-values for the plotted lines. Defaults to c("est_noTrendStart_noComp", "est_noTrendEnd_noComp"). If set to NULL, no lines will be plotted.

line_sig

Character string of the column name containing significance values for line_values. Defaults to "sig_Trend_noComp", which will show the significance of the difference between two time points.

plot_settings

Named list constructed with plotsettings_lineplot(). Defaults to a list with all settings set to 0. There are several predefined lists with optimized settings for different plots. See plotsettings_lineplot() for an overview.

Value

ggplot2 object

Details

Wrapper for ggplot2::geom_segment().

Examples

# tbd