LinearSegmentedColormap.to_listed

LinearSegmentedColormap.to_listed(samples=10, **kwargs)[source]

Convert the LinearSegmentedColormap to a ListedColormap by drawing samples from the colormap.

Parameters

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.

Other Parameters

**kwargs – Passed to ListedColormap.