code: def save_cb(self):
          
  
          # This just defines the basename.
          # Extension has to be explicitly defined or things can get messy.
          w = Widgets.SaveDialog(title='Save plot')
          target = w.get_path()
          if target is None:
              # Save canceled
              return
  
          plot_ext = self.settings.get('file_suffix', '.png')
  
          if not target.endswith(plot_ext):
              target += plot_ext
  
          # TODO: This can be a user preference?
          fig_dpi = 100
  
          try:
              fig = self.tab_plot.get_figure()
              fig.savefig(target, dpi=fig_dpi)
  
          except Exception as e:
              self.logger.error(str(e))
          else:
              self.logger.info('Table plot saved as {0}'.format(target))
docs: Save plot to file.