code: def __init__(self, parent, title):
      super().__init__(parent, -1, title, size=(550, 350))
  
      self.figure = Figure()
      self.axes = self.figure.add_subplot()
  
      self.canvas = FigureCanvas(self, -1, self.figure)
  
      self.change_plot(0)
  
      self.sizer = wx.BoxSizer(wx.VERTICAL)
      self.add_buttonbar()
      self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
      self.add_toolbar()  # comment this out for no toolbar
  
      menuBar = wx.MenuBar()
  
      # File Menu
      menu = wx.Menu()
      m_exit = menu.Append(
          wx.ID_EXIT, "E&xit\tAlt-X", "Exit this simple sample"
      )
      menuBar.Append(menu, "&File")
      self.Bind(wx.EVT_MENU, self.OnClose, m_exit)
  
      if IS_WIN:
          # Equation Menu
          menu = wx.Menu()
          for i, (mt, func) in enumerate(functions):
              bm = mathtext_to_wxbitmap(mt)
              item = wx.MenuItem(menu, 1000 + i, " ")
              item.SetBitmap(bm)
              menu.Append(item)
              self.Bind(wx.EVT_MENU, self.OnChangePlot, item)
          menuBar.Append(menu, "&Functions")
  
      self.SetMenuBar(menuBar)
  
      self.SetSizer(self.sizer)
      self.Fit()
  
file_path: matplotlib/galleries/examples/user_interfaces/mathtext_wx_sgskip.py
imports: from io import BytesIO
  import wx
  import numpy
  from matplotlib.backends.backend_wx import NavigationToolbar2Wx
  from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
  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(parent, title)