Visualizes EMG time-series per cluster and subject. When cluster_id is NULL, shows all clusters. For each cluster, individual subject EMG traces are shown as thin semi-transparent lines, with the cluster-mean waveform overlaid as a bold black line.
Usage
plot_reconstructed_emg(
sim,
cluster_id = NULL,
muscles = NULL,
mean_ci = FALSE,
theme_base_size = 13
)Arguments
- sim
A list returned by
simulate_dynamic_synergy_data(). Must containX_listandz_truecomponents.- cluster_id
Integer specifying which cluster to plot. If NULL, plots all clusters. Default is NULL.
- muscles
Integer vector specifying which muscles to plot. If NULL, plots all muscles. Default is NULL.
- mean_ci
Logical; if TRUE, display +/-1 SD ribbons (not yet implemented). Default is FALSE.
- theme_base_size
Base font size for the plot theme. Default is 13.
Examples
if (FALSE) { # \dontrun{
sim <- simulate_dynamic_synergy_data(N=30, K=3, r=3, M=8, T_each=200)
plot_reconstructed_emg(sim)
plot_reconstructed_emg(sim, cluster_id = 1)
plot_reconstructed_emg(sim, muscles = c(1, 2, 3))
} # }