brainmass.viz.plot_timeseries#
- brainmass.viz.plot_timeseries(signal, ts=None, *, labels=None, ax=None, **kwargs)[source]#
Plot one or more region time series.
- Parameters:
signal (array_like or brainunit.Quantity) –
(time,)or(time, region)data. Units are stripped for plotting.ts (array_like or brainunit.Quantity, optional) – The time axis (length
time). Defaults to sample indices.labels (sequence of str, optional) – Per-region legend labels; a legend is added when given.
ax (matplotlib.axes.Axes, optional) – Axes to draw on. A new figure/axes is created when
None.**kwargs – Forwarded to
matplotlib.axes.Axes.plot().
- Returns:
The axes drawn on.
- Return type:
matplotlib.axes.Axes
See also
plot_phase_portraitplot one variable against another.
Examples
>>> import numpy as np >>> import brainmass >>> t = np.linspace(0, 6, 100) >>> ax = brainmass.viz.plot_timeseries(np.sin(t), ts=t) >>> ax.get_xlabel() 'time'