LinearSegmentedColormap.truncated

LinearSegmentedColormap.truncated(left=None, right=None, name=None, **kwargs)[source]

Return a truncated version of the colormap.

Parameters
  • left (float, optional) – The colormap index for the new “leftmost” color. Must fall between 0 and 1. For example, left=0.1 cuts the leftmost 10%% of the colors.

  • right (float, optional) – The colormap index for the new “rightmost” color. Must fall between 0 and 1. For example, right=0.9 cuts the leftmost 10%% of the colors.

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

  • **kwargs – Passed to LinearSegmentedColormap.updated or PerceptuallyUniformColormap.updated.