nested_loop_paramsteps_plot: Adds step functions for design parameters to a basic facetted...

View source: R/nested_loop.R

nested_loop_paramsteps_plotR Documentation

Adds step functions for design parameters to a basic facetted nested loop plot

Description

Adds steps for design parameters to a basic nested loop plots, i.e. output of nested_loop_base_plot. All parameter definitions are the same as in nested_loop_plot.

Usage

nested_loop_paramsteps_plot(
  p,
  step_data,
  steps_names = NULL,
  steps_names_annotate = TRUE,
  steps_values_annotate = FALSE,
  steps_color = "#AAAAAA",
  steps_annotation_size = 5,
  steps_annotation_nudge = 0.2,
  steps_annotation_color = "#AAAAAA"
)

Arguments

p

ggplot2 object, output from nested_loop_plot.

steps_names

NULL or character value of same length as steps. Specifies names of the design parameters which are used for steps.

steps_names_annotate

Logical. Should steps drawn be annotated with names of corresponding design parameters?

steps_values_annotate

Logical. Should steps drawn be annotated with values of corresponding design parameters? Only the first occurence of a new value is annotated to avoid visual clutter.

steps_color

Color specification for steps drawn.

steps_annotation_size

Numeric. Size of annotations for steps. Likely needs tweaking.

steps_annotation_nudge

Numeric. Fine-tune position of steps annotations in y-axis units. Often, the annotation is overlayed with the lines of the steps - this argument simply increases the distance between annotations and step lines, similar to the nudge_y argument of geom_text.

steps_annotation_color

Color specification of the step annotation text.

plot_data

Output list from nested_loop_base_data.

Value

An updated ggplot2 object. (Note that this function does NOT return a deep copy of the original plot but rather updates it.)


matherealize/looplot documentation built on Jan. 14, 2024, 2:07 a.m.