code: def OnUpdateFigurePanel(self, event):
          
  
          if self.updating:
              return
  
          self.updating = True
          self.figure_panel.update(self.get_figure(self.code))
          self.updating = False
docs: Redraw event handler for the figure panel