def clear_canvas(self):
        """Clear the figure that was painted on the widget."""
        self.fig = None
        self.fmt = None
        self._qpix_buffer = []
        self.repaint()
def clear_canvas ( self ) : self . fig = None self . fmt = None self . _qpix_buffer = [ ] self . repaint ( )
Clear the figure that was painted on the widget.