nigsp.viz.plot_nodes¶
- nigsp.viz.plot_nodes(ns, atlas, filename=None, thr=None, closeplot=False)[source]¶
Create a marker plot in the MNI space.
If ns has 2 dimensions, average first along last dimension.
- Parameters:
- ns
numpy.ndarray A 1- or 2- D array that contains the value of the nodes.
- atlas
str,os.PathLike, 3DNifti1Image, ornumpy.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
floatorNone, optional The threshold to use in plotting the nodes.
- closeplot
bool, optional Whether to close plots after saving or not. Mainly used for debug or use with live python/ipython instances.
- ns
- Returns:
- 0
If there are no errors.
- Raises:
ImportErrorIf matplotlib and/or nilearn are not installed.
ValueErrorIf ns has more than 2 dimensions. If coordinates can’t be extracted from atlas.
Notes
Requires matplotlib and nilearn