Skip to contents

Plot a single lineplot. Multiple of this lineplots are combined as tiles to the output of plot_lineplot().

Usage

plot_single_lineplot(
  plot_dat,
  plot_lims = NULL,
  point_values = "est_noTrend_noComp",
  point_sig = "sig_noTrend_noComp",
  line_values = c("est_noTrendStart_noComp", "est_noTrendEnd_noComp"),
  line_se = NULL,
  line_sig = "sig_Trend_CompWithin",
  label_est = "est_Trend_noComp",
  label_se = "se_Trend_noComp",
  label_sig_high = "sig_Trend_CompCrossDiffWhole",
  label_sig_bold = "sig_Trend_noComp",
  background_lines = TRUE,
  plot_settings = plotsettings_lineplot()
)

Arguments

plot_dat

Input is a list prepared by prep_plot().`

plot_lims

List obtained by calc_plot_lims(), containing different coordinate values.

point_values

Character string of the column name in plot_dat[["plot_points"]] containing the y-values for the plotted points. Defaults to est_noTrend_noComp.

point_sig

Character string of the column name containing significance values for point_values. Defaults to "sig_noTrend_Comp_crossDiff_wholeGroup".

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_se

Character vector of the column name containing the standard errors for the plotted lines. Defaults to NULL, in which case they will be deducted from the line values.

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.

label_est

Character string of the column name containing the brace labels.

label_se

Character string of the column name containing the standard errors for label_est. Will be put in bracktes behind label_est.

label_sig_high

Character string of the column name containing significance values for label_est. Significant values will be marked by a raised 'a'. Normally, should be the comparison of the trend vs. the trend in whole Germany, which can be found in the trendDiff_cross parameter. Defaults to NULL, as this parameter is not always provided.

label_sig_bold

Character string of the column name containing significance values for label_est. Significant values will be marked as bold. Defaults to "sig_Trend_noComp".

background_lines

Logical, indicating whether the whole group trend should be plotted in the background. Defaults to TRUE.

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.

Examples

# tbd