code: def __init__(self):
      super().__init__(None, -1, "CanvasFrame", size=(550, 350))
  
      self.figure = Figure(figsize=(5, 4), dpi=100)
      self.axes = self.figure.add_subplot()
      t = np.arange(0.0, 3.0, 0.01)
      s = np.sin(2 * np.pi * t)
  
      self.axes.plot(t, s)
  
      self.canvas = FigureCanvas(self, -1, self.figure)
  
      self.sizer = wx.BoxSizer(wx.VERTICAL)
      self.sizer.Add(self.canvas, 1, wx.TOP | wx.LEFT | wx.EXPAND)
  
      self.toolbar = MyNavigationToolbar(self.canvas)
      self.toolbar.Realize()
      # By adding toolbar in sizer, we are able to put it at the bottom
      # of the frame - so appearance is closer to GTK version.
      self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
  
      # update the axes menu on the toolbar
      self.toolbar.update()
      self.SetSizer(self.sizer)
      self.Fit()
  
file_path: matplotlib/galleries/examples/user_interfaces/embedding_in_wx4_sgskip.py
imports: import wx
  import numpy
  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 CanvasFrame object from inherited base classes: wx with example: obj = CanvasFrame()