nilearn.plotting: Plotting Brain Data

Plotting code for nilearn.

Functions

find_cut_slices(img[, direction, n_cuts, ...])

Find 'good' cross-section slicing positions along a given axis.

find_xyz_cut_coords(img[, mask_img, ...])

Find the center of the largest activation connected component.

find_parcellation_cut_coords(labels_img[, ...])

Return coordinates of center of mass of 3D parcellation atlas.

find_probabilistic_atlas_cut_coords(maps_img)

Return coordinates of center probabilistic atlas 4D image.

plot_anat([anat_img, cut_coords, ...])

Plot cuts of an anatomical image.

plot_carpet(img[, mask_img, mask_labels, ...])

Plot an image representation of voxel intensities across time.

plot_connectome(adjacency_matrix, node_coords)

Plot connectome on top of the brain glass schematics.

plot_contrast_matrix(contrast_def, design_matrix)

Create plot for contrast definition.

plot_design_matrix(design_matrix[, rescale, ...])

Plot a design matrix.

plot_design_matrix_correlation(design_matrix)

Compute and plot the correlation between regressor of a design matrix.

plot_epi([epi_img, cut_coords, output_file, ...])

Plot cuts of an EPI image.

plot_event(model_event[, cmap, output_file])

Create plot for event visualization.

plot_glass_brain(stat_map_img[, ...])

Plot 2d projections of an ROI/mask image (by default 3 projections: Frontal, Axial, and Lateral).

plot_img(img[, cut_coords, output_file, ...])

Plot cuts of a given image.

plot_img_comparison(ref_imgs, src_imgs, masker)

Create plots to compare two lists of images and measure correlation.

plot_img_on_surf(stat_map[, surf_mesh, ...])

Plot multiple views of plot_surf_stat_map in a single figure.

plot_markers(node_values, node_coords[, ...])

Plot network nodes (markers) on top of the brain glass schematics.

plot_matrix(mat[, title, labels, figure, ...])

Plot the given matrix.

plot_prob_atlas(maps_img[, bg_img, ...])

Plot a Probabilistic atlas onto the anatomical image by default MNI template.

plot_roi(roi_img[, bg_img, cut_coords, ...])

Plot cuts of an ROI/mask image.

plot_stat_map(stat_map_img[, bg_img, ...])

Plot cuts of an ROI/mask image.

plot_surf([surf_mesh, surf_map, bg_map, ...])

Plot surfaces with optional background and data.

plot_surf_contours([surf_mesh, roi_map, ...])

Plot contours of ROIs on a surface, optionally over a statistical map.

plot_surf_roi([surf_mesh, roi_map, bg_map, ...])

Plot ROI on a surface mesh with optional background.

plot_surf_stat_map([surf_mesh, stat_map, ...])

Plot a stats map on a surface mesh with optional background.

show()

Show all the figures generated by nilearn and/or matplotlib.

view_surf([surf_mesh, surf_map, bg_map, ...])

Insert a surface plot of a surface map into an HTML page.

view_img_on_surf(stat_map_img[, surf_mesh, ...])

Insert a surface plot of a statistical map into an HTML page.

view_connectome(adjacency_matrix, node_coords)

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

view_markers(marker_coords[, marker_color, ...])

Insert a 3d plot of markers in a brain into an HTML page.

view_img(stat_map_img[, bg_img, cut_coords, ...])

Interactive html viewer of a statistical map, with optional background.

nilearn.plotting.displays: Interacting with figures

Display objects and utilities.

These objects are returned by plotting functions from the plotting module.

Classes

PlotlySurfaceFigure([figure, output_file])

Implementation of a surface figure obtained with plotly engine.

Axes

BaseAxes(ax, direction, coord[, radiological])

An MPL axis-like object that displays a 2D view of 3D volumes.

CutAxes(ax, direction, coord[, radiological])

An MPL axis-like object that displays a cut of 3D volumes.

GlassBrainAxes(ax, direction, coord[, ...])

An MPL axis-like object that displays a 2D projection of 3D volumes with a schematic view of the brain.

Projectors

OrthoProjector(cut_coords[, axes, black_bg, ...])

A class to create linked axes for plotting orthogonal projections of 3D maps.

LZRYProjector(cut_coords[, axes, black_bg, ...])

The LZRYProjector class enables ? visualization on the same figure through 2D projections with plot_glass_brain.

LYRZProjector(cut_coords[, axes, black_bg, ...])

The LYRZProjector class enables ? visualization on the same figure through 2D projections with plot_glass_brain.

LYRProjector(cut_coords[, axes, black_bg, ...])

The LYRProjector class enables ? visualization on the same figure through 2D projections with plot_glass_brain.

LZRProjector(cut_coords[, axes, black_bg, ...])

The LZRProjector class enables hemispheric sagittal visualization on the same figure through 2D projections with plot_glass_brain.

LRProjector(cut_coords[, axes, black_bg, ...])

The LRProjector class enables left-right visualization on the same figure through 2D projections with plot_glass_brain.

LProjector(cut_coords[, axes, black_bg, ...])

The LProjector class enables the visualization of left 2D projection with plot_glass_brain.

RProjector(cut_coords[, axes, black_bg, ...])

The RProjector class enables the visualization of right 2D projection with plot_glass_brain.

XZProjector(cut_coords[, axes, black_bg, ...])

The XZProjector class enables to combine sagittal and axial views on the same figure through 2D projections with plot_glass_brain.

YZProjector(cut_coords[, axes, black_bg, ...])

The YZProjector class enables to combine coronal and axial views on the same figure through 2D projections with plot_glass_brain.

YXProjector(cut_coords[, axes, black_bg, ...])

The YXProjector class enables to combine coronal and sagittal views on the same figure through 2D projections with plot_glass_brain.

XProjector(cut_coords[, axes, black_bg, ...])

The XProjector class enables sagittal visualization through 2D projections with plot_glass_brain.

YProjector(cut_coords[, axes, black_bg, ...])

The YProjector class enables coronal visualization through 2D projections with plot_glass_brain.

ZProjector(cut_coords[, axes, black_bg, ...])

The ZProjector class enables axial visualization through 2D projections with plot_glass_brain.

Slicers

BaseSlicer(cut_coords[, axes, black_bg, ...])

BaseSlicer implementation which main purpose is to auto adjust the axes size to the data with different layout of cuts.

OrthoSlicer(cut_coords[, axes, black_bg, ...])

Class to create 3 linked axes for plotting orthogonal cuts of 3D maps.

MosaicSlicer(cut_coords[, axes, black_bg, ...])

A class to create 3 Axes for plotting cuts of 3D maps, in multiple rows and columns.

TiledSlicer(cut_coords[, axes, black_bg, ...])

A class to create 3 axes for plotting orthogonal cuts of 3D maps, organized in a 2x2 grid.

XSlicer(cut_coords[, axes, black_bg, ...])

The XSlicer class enables sagittal visualization with plotting functions of Nilearn like nilearn.plotting.plot_img.

XZSlicer(cut_coords[, axes, black_bg, ...])

The XZSlicer class enables to combine sagittal and axial views on the same figure with plotting functions of Nilearn like nilearn.plotting.plot_img.

YXSlicer(cut_coords[, axes, black_bg, ...])

The YXSlicer class enables to combine coronal and sagittal views on the same figure with plotting functions of Nilearn like nilearn.plotting.plot_img.

YZSlicer(cut_coords[, axes, black_bg, ...])

The YZSlicer class enables to combine coronal and axial views on the same figure with plotting functions of Nilearn like nilearn.plotting.plot_img.

YSlicer(cut_coords[, axes, black_bg, ...])

The YSlicer class enables coronal visualization with plotting functions of Nilearn like nilearn.plotting.plot_img.

ZSlicer(cut_coords[, axes, black_bg, ...])

The ZSlicer class enables axial visualization with plotting functions of Nilearn like nilearn.plotting.plot_img.

Functions

get_projector(display_mode)

Retrieve a projector from a given display mode.

get_slicer(display_mode)

Retrieve a slicer from a given display mode.