docstr: A handle to plot the matrix in a jupyter notebook, potentially this could also be passed to save_fig
docstr_tok: ["A","handle","to","plot","the","matrix","in","a","jupyter","notebook",",","potentially","this","could","also","be","passed","to","save_fig"]
code: def plot(
      self,
      normalize: Optional[str] = None,
      xticks_rotation="vertical",
      values_format: str = None,
      cmap: str = "PuBu",
      figsize: int = 11,
      **display_args,
  ):
      """
      A handle to plot the matrix in a jupyter notebook, potentially this could also be passed to save_fig
      """
      if normalize not in ["true", "pred", "all", None]:
          raise ValueError(
              "normalize must be one of {'true', 'pred', "
              "'all', None}"
          )
      # properly display ints and floats
      if values_format is not None:
          values_format = ".2f" if normalize else "d"
  
      cm = self._maybe_normalize(self.confusion_matrix, normalize)
      labels_named = self.class_map._id2class
      cm_display = sklearn.metrics.ConfusionMatrixDisplay(
          cm, display_labels=labels_named
      )
      figure = cm_display.plot(
          xticks_rotation=xticks_rotation,
          cmap=cmap,
          values_format=values_format,
          **display_args,
      ).figure_
      figure.set_size_inches(figsize, figsize)
      plt.close()
      return figure
  
file_path: icevision/icevision/metrics/confusion_matrix/confusion_matrix.py
imports: from icevision.data.prediction import Prediction
  from icevision.metrics.metric import Metric
  from icevision.imports import *
  from icevision.metrics.confusion_matrix.confusion_matrix_utils import *
  import PIL
label_desc: Use image node_id 5 for calling the SimpleConfusionMatrix obj's underlying member method code with example usage: obj.plot(normalize, xticks_rotation, values_format, cmap, figsize) and returns: figure