ContinuousColormap.to_discrete(samples=10, name=None, **kwargs)[source]

Convert the ContinuousColormap to a DiscreteColormap by drawing samples from the colormap.

  • samples (int or list of float, optional) – If integer, draw samples at the colormap coordinates np.linspace(0, 1, samples). If list of float, draw samples at the specified points.

  • name (str, optional) – The name of the new colormap. Default is + '_copy'.

Other Parameters

**kwargs – Passed to DiscreteColormap.