Visualizes time-varying neural command trajectories estimated from synergy activation patterns. This function creates a low-dimensional representation of the temporal evolution of neural control signals, revealing how motor commands change over time within and across clusters.
Usage
plot_neural_command(
sim,
method = "pca",
color_by = "cluster",
smooth = TRUE,
theme_base_size = 14
)Arguments
- sim
A list returned by
simulate_dynamic_synergy_data(). Must containC_listandz_truecomponents.- method
Character string specifying the embedding method: "pca" or "umap". Default is "pca".
- color_by
Character string specifying how to color points: "cluster" (by cluster assignment) or "time" (by temporal progression). Default is "cluster".
- smooth
Logical; if TRUE, connect time points with smooth paths using geom_path with alpha gradient. Default is TRUE.
- theme_base_size
Base font size for the plot theme. Default is 14.
Examples
if (FALSE) { # \dontrun{
sim <- simulate_dynamic_synergy_data(N=30, K=3, r=3, M=8, T_each=200)
plot_neural_command(sim, method = "pca", color_by = "cluster")
plot_neural_command(sim, method = "umap", color_by = "time", smooth = TRUE)
} # }