code: def BuildPanel(self):
          
          figsize = (1.0*self.size[0]/self.dpi, 1.0*self.size[1]/self.dpi)
          self.fig   = Figure(figsize, dpi=self.dpi)
          self.axes  = self.fig.add_axes([0.0, 0.0, 1.0, 1.0])
  
          self.canvas = FigureCanvasWxAgg(self, -1, self.fig)
          self.fig.set_facecolor('#FFFFFD')
  
          self.conf.axes  = self.axes
          self.conf.fig   = self.fig
          self.conf.canvas= self.canvas
  
          # self.canvas.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
          # This way of adding to sizer allows resizing
          sizer = wx.BoxSizer(wx.HORIZONTAL)
          sizer.Add(self.canvas, 1, wx.ALL|wx.GROW)
          self.SetSizer(sizer)
          self.Fit()
          self.addCanvasEvents()
docs: builds basic GUI panel and popup menu