nested_loop_paramsteps_data: Generate data for facetted nested loop plots

View source: R/nested_loop.R

nested_loop_paramsteps_dataR Documentation

Generate data for facetted nested loop plots

Description

This function generates coordinates for plotting steps for design parameters based on the data from nested_loop_base_data. All parameter definitions are the same as in nested_loop_plot.

Usage

nested_loop_paramsteps_data(
  plot_data,
  steps_y_base = 0,
  steps_y_height = 1,
  steps_y_shift = NULL
)

Arguments

plot_data

Outout list from nested_loop_base_data.

steps_y_base

Numeric. Maximum height of steps in y-axis units. I.e. if steps are increasing (due to parameter_decreasing == FALSE) this represents the y-axis value of the uppermost step, if parameter_decreasing == TRUE in plot_data this is the y-axis value of the first step.

steps_y_height

Numeric. Height of a single step in y-axis units. If a single numeric, the same height is used for all steps. If a vector, then the step heights may vary for each layer (as defined by steps argument). Values are cycled to have appropriate length.

steps_y_shift

Numeric. Distance in y-axis units between step layers, i.e. distance between step drawn for different design parameters (if steps comprises more than one variable). As steps_y_height, this can be a vector to allow varying shift between layers. If NULL, an automated attempt is made to set the value to 0.25*steps_y_height, but this may need manual tweaking.

Value

Updates the listplot_data:

  1. Adds an entry for stepdf, which is a data.frame containing the values for the parameter steps to be plotted.

  2. Adds user input as entries to the list input: *steps_y_base, steps_y_shift, steps_y_height*.


matherealize/looplot documentation built on May 24, 2024, 9:14 a.m.