This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.


nilearn.plotting.view_connectome(adjacency_matrix, node_coords, edge_threshold=None, edge_cmap=<matplotlib.colors.LinearSegmentedColormap object>, symmetric_cmap=True, linewidth=6.0, node_color='auto', node_size=3.0, colorbar=True, colorbar_height=0.5, colorbar_fontsize=25, title=None, title_fontsize=25)[source]#

Insert a 3d plot of a connectome into an HTML page.

adjacency_matrixndarray, shape=(n_nodes, n_nodes)

The weights of the edges.

node_coordsndarray, shape=(n_nodes, 3)

The coordinates of the nodes in MNI space.

node_colorcolor or sequence of colors, default=’auto’

Color(s) of the nodes.

edge_thresholdstr, number or None, optional

If None, no thresholding. If it is a number only connections of amplitude greater than threshold will be shown. If it is a string it must finish with a percent sign, e.g. “25.3%”, and only connections of amplitude above the given percentile will be shown.

edge_cmapstr or matplotlib colormap, default=cm.bwr

Colormap to use.

symmetric_cmapbool, default=True

Make colormap symmetric (ranging from -vmax to vmax).

linewidthfloat, default=6.0

Width of the lines that show connections.

node_sizefloat, default=3.0

Size of the markers showing the seeds in pixels.

colorbarbool, default=True

Add a colorbar.

colorbar_heightfloat, default=0.5

Height of the colorbar, relative to the figure height.

colorbar_fontsizeint, default=25

Fontsize of the colorbar tick labels.

titlestr, optional

Title for the plot.

title_fontsizeint, default=25

Fontsize of the title.

ConnectomeViewplot of the connectome.

It can be saved as an html page or rendered (transparently) by the Jupyter notebook. Useful methods are :

  • ‘resize’ to resize the plot displayed in a Jupyter notebook

  • ‘save_as_html’ to save the plot to a file

  • ‘open_in_browser’ to save the plot and open it in a web browser.

See also


projected views of a connectome in a glass brain.


interactive plot of colored markers

nilearn.plotting.view_surf, nilearn.plotting.view_img_on_surf

interactive view of statistical maps or surface atlases on the cortical surface.

Examples using nilearn.plotting.view_connectome#

Computing a connectome with sparse inverse covariance

Computing a connectome with sparse inverse covariance

Extracting signals of a probabilistic atlas of functional regions

Extracting signals of a probabilistic atlas of functional regions

Extract signals on spheres and plot a connectome

Extract signals on spheres and plot a connectome