class_docstr: An MPLPlot object draws a matplotlib figure object when called or
  indexed but can also return a matplotlib animation object as
  appropriate. MPLPlots take element objects such as Image, Contours
  or Points as inputs and plots them in the appropriate format using
  matplotlib. As HoloMaps are supported, all plots support animation
  via the anim() method.
code: def __init__(self, fig=None, axis=None, **params):
      self._create_fig = True
      super().__init__(**params)
      # List of handles to matplotlib objects for animation update
      self.fig_scale = self.fig_size / 100.0
      if isinstance(self.fig_inches, (tuple, list)):
          self.fig_inches = [
              None if i is None else i * self.fig_scale
              for i in self.fig_inches
          ]
      else:
          self.fig_inches *= self.fig_scale
      if self.fig_latex:
          self.fig_rcparams["text.usetex"] = True
  
      if self.renderer.interactive:
          plt.ion()
          self._close_figures = False
      elif not self.renderer.notebook_context:
          plt.ioff()
  
      fig, axis = self._init_axis(fig, axis)
  
      self.handles["fig"] = fig
      self.handles["axis"] = axis
      self.handles["bbox_extra_artists"] = []
  
imports: from contextlib import contextmanager
  from itertools import chain
  import matplotlib
  import numpy
  import param
  from matplotlib import animation, gridspec, pyplot, rcParams
  from matplotlib.font_manager import font_scalings
  from mpl_toolkits.mplot3d import Axes3D
  from ...core import AdjointLayout, Collator, CompositeOverlay, Element, Empty, GridMatrix, GridSpace, HoloMap, Layout, NdLayout
  from ...core.options import SkipRendering, Store
  from ...core.util import int_to_alpha, int_to_roman, wrap_tuple_streams
  from ..plot import DimensionedPlot, GenericAdjointLayoutPlot, GenericCompositePlot, GenericElementPlot, GenericLayoutPlot
  from ..util import attach_streams, collate, displayable
  from .util import compute_ratios, fix_aspect, get_old_rcparams
label_desc: Use image node_id 1 to create a new MPLPlot object from inherited base classes: DimensionedPlot with example: obj = MPLPlot(fig, axis)