Note

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.

7.10.19. nilearn.plotting.view_connectome

nilearn.plotting.view_connectome(adjacency_matrix, coords, threshold=None, cmap=<matplotlib.colors.LinearSegmentedColormap object>, symmetric_cmap=True, linewidth=6.0, marker_size=3.0)

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

Parameters:

adjacency_matrix : ndarray, shape=(n_nodes, n_nodes)

the weights of the edges.

coords : ndarray, shape=(n_nodes, 3)

the coordinates of the nodes in MNI space.

threshold : str, number or None, optional (default=None)

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.

cmap : str or matplotlib colormap, optional

symmetric_cmap : bool, optional (default=True)

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

linewidth : float, optional (default=6.)

Width of the lines that show connections.

marker_size : float, optional (default=3.)

Size of the markers showing the seeds.

Returns:

ConnectomeView : plot 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

nilearn.plotting.plot_connectome
projected views of a connectome in a glass brain.
nilearn.plotting.view_markers
interactive plot of colored markers

nilearn.plotting.view_surf, nilearn.plotting.view_img_on_surf