plot_classified_syns: Plot muscle synergies

View source: R/plot_classified_syns.R

plot_classified_synsR Documentation

Plot muscle synergies

Description

Plot muscle synergies

Usage

plot_classified_syns(
  x,
  dark_mode = FALSE,
  line_size = 0.9,
  dot_size = 0.1,
  line_col = "black",
  sd_col = "grey80",
  ylim_min_M = 0,
  ylim_max_M = 1,
  ylim_min_P = -0.2,
  ylim_max_P = 1.2,
  condition = NA,
  show_plot = TRUE
)

Arguments

x

List of objects of class musclesyneRgies (must be classified)

dark_mode

To enable dark mode

line_size

Line thickness

dot_size

Dot size on muscle weights (NA to remove dots)

line_col

Line colour

sd_col

Standard deviation ribbon colour (NA to remove ribbon)

ylim_min_M

y-axis lower limit for muscle weights

ylim_max_M

y-axis upper limit for muscle weights

ylim_min_P

y-axis lower limit for activation patterns

ylim_max_P

y-axis upper limit for activation patterns

condition

Character: the condition that is being analysed, for archiving purposes

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

Global plot containing the average classified muscle synergies and individual trials (muscle weights) or standard deviations (activation patterns)

Examples

# Load some data
data(SYNS)

# Classify synergies with k-means
SYNS_classified <- classify_kmeans(SYNS)

# Save plot of classified synergies
pp <- plot_classified_syns(
  SYNS_classified,
  dark_mode = TRUE,
  line_col = "tomato1",
  sd_col = "tomato4",
  condition = "TW",
  show_plot = FALSE
)

musclesyneRgies documentation built on Aug. 26, 2026, 9:06 a.m.