Skip to contents

Calculate different plot limit values.

Usage

calc_plot_lims(plot_dat, point_values, line_values, plot_settings)

Arguments

plot_dat

Input is a list prepared by prep_plot().`

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.

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.

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

List containing the following elements:

  • range_y: Minimum and maximum of the values in point_values.

  • y_lims_total: Minimum and maximum value of the plot.

  • coords: Y-value of the first brace start, and heighest y-value of the plot.

Examples

#tbd