This documentation is for development version 0.18.dev0.


mne.viz.mne_analyze_colormap(limits=[5, 10, 15], format='mayavi')[source]

Return a colormap similar to that used by mne_analyze.

limits : list (or array) of length 3 or 6

Bounds for the colormap, which will be mirrored across zero if length 3, or completely specified (and potentially asymmetric) if length 6.

format : str

Type of colormap to return. If ‘matplotlib’, will return a matplotlib.colors.LinearSegmentedColormap. If ‘mayavi’, will return an RGBA array of shape (256, 4).

cmap : instance of colormap | array

A teal->blue->gray->red->yellow colormap.


For this will return a colormap that will display correctly for data that are scaled by the plotting function to span [-fmax, fmax].


The following code will plot a STC using standard MNE limits:

colormap = mne.viz.mne_analyze_colormap(limits=[5, 10, 15]) brain = stc.plot(‘fsaverage’, ‘inflated’, ‘rh’, colormap) brain.scale_data_colormap(fmin=-15, fmid=0, fmax=15, transparent=False)