neural_trajectory#
- class braintools.visualize.neural_trajectory(data, dims=None, time_color=True, start_marker='o', end_marker='s', ax=None, figsize=(10, 8), cmap='viridis', alpha=0.7, linewidth=2.0, title=None, **kwargs)#
Plot neural state trajectory in 2D or 3D space.
- Parameters:
data (
ndarray) – Neural state data of shape (time, features).dims (
Tuple[int,int,int] |None) – Dimensions to plot (x, y) or (x, y, z). If None, uses first 2-3 dims.time_color (
bool) – Whether to color trajectory by time.start_marker (
str) – Markers for start and end points.end_marker (
str) – Markers for start and end points.ax (
Axes|None) – Axes to plot on.figsize (
Tuple[float,float]) – Figure size if creating new figure.cmap (
str) – Colormap for time coloring.alpha (
float) – Alpha transparency.linewidth (
float) – Width of trajectory line.**kwargs – Additional arguments passed to plot.
- Returns:
ax – The axes object containing the plot.
- Return type:
Axes