class_docstr: Plotting object allows for visualization of absolute group bias metrics and
  relative disparities calculated by Aequitas Group(), Bias(), and Fairness()
  class instances.
docstr: Use only part of a colormap (min_value to max_value) across a given number
  of partitions.
  
  :param orig_cmap: an existing Matplotlib colormap.
  :param min_value: desired minimum value (0.0 to 1.0) for truncated
      colormap. Default is 0.0.
  :param max_value: desired maximum value (0.0 to 1.0) for truncated
      colormap. Default is 1.0.
  :param num_colors: number of colors to spread colormap gradient across
      before truncating. Default is 100.
  :return: Truncated color map
  
  Attribution: Adapted from: https://stackoverflow.com/questions/
  18926031/how-to-extract-a-subset-of-a-colormap-as-a-new-colormap-in-matplotlib
code: def _truncate_colormap(
      orig_cmap, min_value=0.0, max_value=1.0, num_colors=100
  ):
      """
      Use only part of a colormap (min_value to max_value) across a given number
      of partitions.
  
      :param orig_cmap: an existing Matplotlib colormap.
      :param min_value: desired minimum value (0.0 to 1.0) for truncated
          colormap. Default is 0.0.
      :param max_value: desired maximum value (0.0 to 1.0) for truncated
          colormap. Default is 1.0.
      :param num_colors: number of colors to spread colormap gradient across
          before truncating. Default is 100.
      :return: Truncated color map
  
      Attribution: Adapted from: https://stackoverflow.com/questions/
      18926031/how-to-extract-a-subset-of-a-colormap-as-a-new-colormap-in-matplotlib
      """
      cmap = plt.get_cmap(orig_cmap)
      new_cmap = matplotlib.colors.LinearSegmentedColormap.from_list(
          "trunc({n},{a:.2f},{b: .2f})".format(
              n=cmap.name, a=min_value, b=max_value
          ),
          cmap(np.linspace(min_value, max_value, num_colors)),
      )
      return new_cmap
  
imports: import logging
  import math
  import numpy
  import collections
  import seaborn
  import matplotlib.pyplot
  import matplotlib.colors
  import matplotlib.cm
  from aequitas import squarify_flipped
label_desc: Use image node_id 5 for calling the Plot obj's underlying member method code with example usage: obj._truncate_colormap(orig_cmap, min_value, max_value, num_colors) and returns: new_cmap