pyeeg.vizu.colormap_masked

pyeeg.vizu.colormap_masked(ncolors=256, knee_index=None, cmap='inferno', alpha=0.3)

Create a colormap with value below a threshold being greyed out and transparent.

Parameters:
  • ncolors (int) – default to 256

  • knee_index (int) – index from which transparency stops e.g. knee_index = np.argmin(abs(np.linspace(0., 3.5, ncolors)+np.log10(0.05)))

Returns:

cm – Colormap instance

Return type:

LinearSegmentedColormap