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.
8.10.14. nilearn.plotting.plot_markers¶
nilearn.plotting.
plot_markers
(node_values, node_coords, node_size='auto', node_cmap=<matplotlib.colors.ListedColormap object>, node_vmin=None, node_vmax=None, node_threshold=None, alpha=0.7, output_file=None, display_mode='ortho', figure=None, axes=None, title=None, annotate=True, black_bg=False, node_kwargs=None, colorbar=True)¶Plot network nodes (markers) on top of the brain glass schematics.
Nodes are color coded according to provided nodal measure. Nodal measure usually represents some notion of node importance.
Parameters: node_values : array_like of length n
Vector containing nodal importance measure. Each node will be colored acording to corresponding node value.
node_coords : numpy array_like of shape (n, 3)
3d coordinates of the graph nodes in world space.
node_size : ‘auto’ or scalar or array-like
Size(s) of the nodes in points^2. By default the size of the node is inversely proportional to the number of nodes.
node_cmap : str or colormap
Colormap used to represent the node measure.
node_vmin : float, optional
Lower bound of the colormap. If None, the min of the node_values is used.
node_vmax : float, optional
Upper bound of the colormap. If None, the min of the node_values is used.
node_threshold : float
If provided only the nodes with a value greater than node_threshold will be shown.
alpha : float between 0 and 1. Default is 0.7
Alpha transparency for markers
output_file : string, 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_mode : string, 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’.
figure : integer or matplotlib figure, optional
Matplotlib figure used or its number. If None is given, a new figure is created.
axes : matplotlib 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.
title : string, optional
The title displayed on the figure.
annotate : boolean, optional
If annotate is True, positions and left/right annotation are added to the plot.
black_bg : boolean, optional
If True, the background of the image is set to be black. If you wish to save figures with a black background, you will need to pass “facecolor=’k’, edgecolor=’k’” to matplotlib.pyplot.savefig.
node_kwargs : dict
will be passed as kwargs to the plt.scatter call that plots all the nodes in one go
colorbar : boolean, optional
If True, display a colorbar on the right of the plots.