code: def __init__(self, parent):
      super().__init__(parent, -1)
  
      self.fig = Figure((5, 4), 75)
      self.canvas = FigureCanvas(self, -1, self.fig)
      self.toolbar = NavigationToolbar(
          self.canvas
      )  # matplotlib toolbar
      self.toolbar.Realize()
  
      # Now put all into a sizer
      sizer = wx.BoxSizer(wx.VERTICAL)
      # This way of adding to sizer allows resizing
      sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
      # Best to allow the toolbar to resize!
      sizer.Add(self.toolbar, 0, wx.GROW)
      self.SetSizer(sizer)
      self.Fit()
  
file_path: matplotlib/galleries/examples/user_interfaces/embedding_in_wx3_sgskip.py
imports: import wx
  import wx.xrc
  import numpy
  from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
  from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg
  import matplotlib.cbook
  import matplotlib.cm
  from matplotlib.figure import Figure
label_desc: Use image node_id 1 to create a new PlotPanel object from inherited base classes: wx with example: obj = PlotPanel(parent)