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.

nilearn.plotting.plot_design_matrix_correlation

nilearn.plotting.plot_design_matrix_correlation(design_matrix, tri='full', cmap='bwr', output_file=None, **kwargs)[source]

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

The drift and constant regressors are omitted from the plot.

Added in version 0.11.0.dev.

Parameters:
design_matrixpandas.DataFrame

_description_

tri{‘full’, ‘diag’}, default=’full’

Which triangular part of the matrix to plot:

  • ‘diag’: Plot the lower part with the diagonal

  • ‘full’: Plot the full matrix

%(cmap)s

Default=`bwr`. This must be a diverging colormap as the correlation matrix will be centered on 0. The allowed colormaps are:

  • “bwr”

  • “RdBu_r”

  • “seismic_r”

%(output_file)s
kwargsextra keyword arguments, optional

Extra keyword arguments are sent to nilearn.plotting.plot_matrix

Returns:
displaymatplotlib.axes.Axes

Axes image.

Examples using nilearn.plotting.plot_design_matrix_correlation

Examples of design matrices

Examples of design matrices