code: def copy_figure(self):
          
          if self.fmt in ['image/png', 'image/jpeg']:
              qpixmap = QPixmap()
              qpixmap.loadFromData(self.fig, self.fmt.upper())
              QApplication.clipboard().setImage(qpixmap.toImage())
          elif self.fmt == 'image/svg+xml':
              svg_to_clipboard(self.fig)
          else:
              return
  
          self.blink_figure()
docs: Copy figure to clipboard.