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.plot_prob_atlas(maps_img, anat_img=<nilearn.plotting.img_plotting._MNI152Template object>, view_type='auto', threshold=None, linewidths=2.5, cut_coords=None, output_file=None, display_mode='ortho', figure=None, axes=None, title=None, annotate=True, draw_cross=True, black_bg='auto', dim=False, cmap=<matplotlib.colors.LinearSegmentedColormap object>, vmin=None, vmax=None, alpha=0.5, **kwargs)

Plot the probabilistic atlases onto the anatomical image by default MNI template


maps_img: Niimg-like object or the filename :

4D image of the probabilistic atlas maps

anat_img : Niimg-like object

See The anatomical image to be used as a background. If None is given, nilearn tries to find a T1 template.

view_type: {‘auto’, ‘contours’, ‘filled_contours’, ‘continuous’}, optional :

By default view_type == ‘auto’, which means maps are overlayed as contours if number of maps to display are more or overlayed as continuous colors if number of maps are less. If view_type == ‘contours’, maps are overlayed as contours If view_type == ‘filled_contours’, maps are overlayed as contours along with color fillings inside the contours. If view_type == ‘continuous’, maps are overlayed as continous colors irrespective of the number maps.

threshold: None, a str or a number, list of either str or number, optional :

If threshold is a string it must finish with a percent sign, e.g. “25.3%”, and it is a percentile. Or if it is a number, it should be a real number, in which case it is the value to threshold at. This option is served for two purposes, for contours and contour fillings threshold serves to select the level of the maps to display and same threshold is applied for color fillings. For continuous overlays this threshold value serves to select the maps which are greater than a given value or list of given values. If None is given, the maps are thresholded with default value.

linewidths: float, optional :

This option can be used to set the boundary thickness of the contours.

cut_coords: None, a tuple of floats, or an integer :

The MNI coordinates of the point where the cut is performed If display_mode is ‘ortho’, this should be a 3-tuple: (x, y, z) For display_mode == ‘x’, ‘y’, or ‘z’, then these are the coordinates of each cut in the corresponding direction. If None is given, the cuts is calculated automaticaly. If display_mode is ‘x’, ‘y’ or ‘z’, cut_coords can be an integer, in which case it specifies the number of cuts to perform

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: {‘ortho’, ‘x’, ‘y’, ‘z’} :

Choose the direction of the cuts: ‘x’ - saggital, ‘y’ - coronal, ‘z’ - axial, ‘ortho’ - three cuts are performed in orthogonal directions.

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.

draw_cross: boolean, optional :

If draw_cross is True, a cross is drawn on the plot to indicate the cut plosition.

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 pylab’s savefig.

cmap: matplotlib colormap, optional :

The colormap for the atlas maps

vmin: float :

Lower bound for plotting, passed to matplotlib.pyplot.imshow

vmax: float :

Upper bound for plotting, passed to matplotlib.pyplot.imshow

alpha: float between 0 and 1 :

Alpha sets the transparency of the color inside the filled contours.