eelbrain.plot.two_step_colormap

eelbrain.plot.two_step_colormap(left_max, left, center='transparent', right=None, right_max=None, name='two-step')[source]

Colormap with 2 or 4 gradients (e.g., white - red - transparent - blue - white)

Parameters:

Examples

Standard red/blue:

>>> cmap = plot.two_step_colormap('black', 'red', 'transparent', 'blue', 'black', name='red-blue')
>>> plot.ColorBar(cmap, 1)

Or somewhat more adventurous:

>>> cmap = plot.two_step_colormap('black', (1, 0, 0.3), 'transparent', (0.3, 0, 1), 'black', name='red-blue-2')