nigsp.viz.plot_connectivity

nigsp.viz.plot_connectivity(mtx, filename=None, closeplot=False)[source]

Create a connectivity matrix plot.

If mtx has 3 dimensions, average first along the last axis.

Parameters:
mtxnumpy.ndarray

A (square) array with connectivity information inside.

filenameNone, str, or os.PathLike, optional

The path to save the plot on disk.

closeplotbool, optional

Whether to close plots after saving or not. Mainly used for debug or use with live python/ipython instances.

Returns:
0

If there are no errors.

Raises:
ImportError

If matplotlib and/or nilearn are not installed.

ValueError

If mtx has more than 3 dimensions.

Notes

Requires matplotlib and nilearn