plot_syn_trials {musclesyneRgies}R Documentation

Plot muscle synergies (individual trials)

Description

Plot muscle synergies (individual trials)

Usage

plot_syn_trials(
  x,
  max_syns,
  trial,
  dark_mode = FALSE,
  line_size = 0.6,
  line_col = "black",
  sd_col = "grey80",
  show_plot = TRUE
)

Arguments

x

Object of class musclesyneRgies

max_syns

Number of synergies to be plotted or how many rows should the final panel be divided into

trial

Character: the name of the considered trial, for archiving purposes

dark_mode

To enable dark mode

line_size

Line thickness

line_col

Line colour

sd_col

Standard deviation ribbon colour

show_plot

Logical, to decide whether plots should be plotted in the active graphic device

Details

If show_plot is TRUE (default) plots are also shown in the active graphic device. Plots can then be saved with the preferred export method, such as ggplot2::ggsave.

Value

Plots of the unclassified synergies, trial by trial.

Examples

# Load some data
data(SYNS)

# Find maximum number of synergies
max_syns <- max(unlist(lapply(SYNS, function(x) x$syns)))

# Save a plot with the first (and only, in this case) trial in the list
pp <- plot_syn_trials(SYNS[[1]],
  max_syns = max_syns,
  trial = names(SYNS)[1],
  dark_mode = TRUE,
  line_size = 0.8,
  line_col = "tomato1",
  sd_col = "tomato4",
  show_plot = FALSE
)

[Package musclesyneRgies version 1.2.5 Index]