<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_canvas(self):
 """Clear the figure that was painted on the widget."""

        self.fig = None
        self.fmt = None
        self._qpix_buffer = []
        self.repaint()