brainmass.viz.plot_functional_connectivity#
- brainmass.viz.plot_functional_connectivity(data, *, is_matrix=False, labels=None, ax=None, **kwargs)[source]#
Plot a functional-connectivity matrix.
When
datais a(time, region)time series (the default), the functional connectivity is computed viabraintools.metric.functional_connectivity()and plotted. Whenis_matrixisTrue,datais treated as an already-computed(region, region)FC matrix.- Parameters:
data (array_like or brainunit.Quantity) – Either a
(time, region)time series or a(region, region)FC matrix (seeis_matrix). Units are stripped before computing FC.is_matrix (bool, optional) – If
True,datais a precomputed FC matrix. DefaultFalse.labels (sequence of str, optional) – Tick labels for both axes.
ax (matplotlib.axes.Axes, optional) – Axes to draw on. A new figure/axes is created when
None.**kwargs – Forwarded to
plot_connectivity().
- Returns:
The axes drawn on.
- Return type:
matplotlib.axes.Axes
See also
plot_connectivitythe underlying heatmap helper.
braintools.metric.functional_connectivitythe surfaced metric.
Examples
>>> import brainmass >>> sig = brainmass.datasets.load_dataset('example_signal') >>> ax = brainmass.viz.plot_functional_connectivity(sig.signal) >>> len(ax.images) 1