# mne.viz.plot_csd¶

mne.viz.plot_csd(csd, info=None, mode='csd', colorbar=True, cmap=None, n_cols=None, show=True)[source]

Plot CSD matrices.

A sub-plot is created for each frequency. If an info object is passed to the function, different channel types are plotted in different figures.

Parameters
csdinstance of CrossSpectralDensity

The CSD matrix to plot.

infoinstance of Info | None

To split the figure by channel-type, provide the measurement info. By default, the CSD matrix is plotted as a whole.

mode‘csd’ | ‘coh’

Whether to plot the cross-spectral density (‘csd’, the default), or the coherence (‘coh’) between the channels.

colorbarbool

Whether to show a colorbar. Defaults to True.

cmap

The matplotlib colormap to use. Defaults to None, which means the colormap will default to matplotlib’s default.

n_cols

CSD matrices are plotted in a grid. This parameter controls how many matrix to plot side by side before starting a new row. By default, a number will be chosen to make the grid as square as possible.

showbool

Whether to show the figure. Defaults to True.

Returns
fig

The figures created by this function.