DiscreteColormap.truncate

DiscreteColormap.truncate(left=None, right=None, name=None)[source]

Return a truncated version of the colormap.

Parameters
  • left (float, default: None) – The colormap index for the new “leftmost” color. Must fall between 0 and self.N. For example, left=2 drops the first two colors.

  • right (float, default: None) – The colormap index for the new “rightmost” color. Must fall between 0 and self.N. For example, right=4 keeps the first four colors.

  • name (str, default: '_name_copy') – The new colormap name.