nigsp.viz.plot_edges¶
- nigsp.viz.plot_edges(mtx, atlas, filename=None, thr=None, closeplot=False)[source]¶
Create a connectivity plot in the MNI space.
If mtx has 2 dimensions, average first along last dimension.
- Parameters:
- mtx
numpy.ndarray A 2- or 3- D array that contains the value of the nodes.
- atlas
str|os.PathLike| 3DNifti1Image|numpy.ndarray The 3d nifti image of an atlas, a string or path to its position, or a list of coordinates of the center of mass of parcels.
- filename
None,str, oros.PathLike, optional The path to save the plot on disk.
- thr
float,strorNone, optional The threshold to use in plotting the nodes. If :class:
str, needs to express a percentage.- closeplot
bool, optional Whether to close plots after saving or not. Mainly used for debug or use with live python/ipython instances.
- mtx
- Returns:
- 0
If there are no errors.
- Raises:
ImportErrorIf matplotlib and/or nilearn are not installed.
ValueErrorIf mtx has more than 3 dimensions. If coordinates can’t be extracted from atlas.
Notes
Requires
matplotlibandnilearn.