code: def load_figure(self, fig, fmt):
          
          self.fig = fig
          self.fmt = fmt
  
          if fmt in ['image/png', 'image/jpeg']:
              self._qpix_orig = QPixmap()
              self._qpix_orig.loadFromData(fig, fmt.upper())
          elif fmt == 'image/svg+xml':
              self._qpix_orig = QPixmap(svg_to_image(fig))
  
          self._qpix_buffer = [self._qpix_orig]
          self.fwidth = self._qpix_orig.width()
          self.fheight = self._qpix_orig.height()
docs: Load the figure from a png, jpg, or svg image, convert it in
          a QPixmap, and force a repaint of the widget.