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.13. nilearn.plotting.plot_connectome_strength

nilearn.plotting.plot_connectome_strength(adjacency_matrix, node_coords, node_size='auto', cmap=None, output_file=None, display_mode='ortho', figure=None, axes=None, title=None)

Plot connectome strength on top of the brain glass schematics.

The strength of a connection is define as the sum of absolute values of the edges arriving to a node.

Parameters
adjacency_matrixnumpy array of shape (n, n)

represents the link strengths of the graph. Assumed to be a symmetric matrix.

node_coordsnumpy array_like of shape (n, 3)

3d coordinates of the graph nodes in world space.

node_size‘auto’ or scalar

size(s) of the nodes in points^2. By default the size of the node is inversely propertionnal to the number of nodes.

cmapstr or colormap

colormap used to represent the strength of a node.

output_filestring, or None, optional

The name of an image file to export the plot to. Valid extensions are .png, .pdf, .svg. If output_file is not None, the plot is saved to a file, and the display is closed.

display_modestring, optional. Default is ‘ortho’.

Choose the direction of the cuts: ‘x’ - sagittal, ‘y’ - coronal, ‘z’ - axial, ‘l’ - sagittal left hemisphere only, ‘r’ - sagittal right hemisphere only, ‘ortho’ - three cuts are performed in orthogonal directions. Possible values are: ‘ortho’, ‘x’, ‘y’, ‘z’, ‘xz’, ‘yx’, ‘yz’, ‘l’, ‘r’, ‘lr’, ‘lzr’, ‘lyr’, ‘lzry’, ‘lyrz’.

figureinteger or matplotlib figure, optional

Matplotlib figure used or its number. If None is given, a new figure is created.

axesmatplotlib axes or 4 tuple of float: (xmin, ymin, width, height), optional

The axes, or the coordinates, in matplotlib figure space, of the axes used to display the plot. If None, the complete figure is used.

titlestring, optional

The title displayed on the figure.

Notes

The plotted image should in MNI space for this function to work properly.

7.10.13.1. Examples using nilearn.plotting.plot_connectome_strength