code: def __init__(self, parent, id=-1, dpi=None, **kwargs):
      super().__init__(parent, id=id, **kwargs)
      self.figure = Figure(dpi=dpi, figsize=(2, 2))
      self.canvas = FigureCanvas(self, -1, self.figure)
      self.toolbar = NavigationToolbar(self.canvas)
      self.toolbar.Realize()
  
      sizer = wx.BoxSizer(wx.VERTICAL)
      sizer.Add(self.canvas, 1, wx.EXPAND)
      sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
      self.SetSizer(sizer)
  
file_path: matplotlib/galleries/examples/user_interfaces/embedding_in_wx5_sgskip.py
imports: import wx
  import wx.lib.agw.aui
  import wx.lib.mixins.inspection
  from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
  from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg
  from matplotlib.figure import Figure
label_desc: Use image node_id 1 to create a new Plot object from inherited base classes: wx with example: obj = Plot(parent, id, dpi)