title: How to clear a plot in PyQt?
body: <p>I have created a little app in PyQt using QT Designer. I have some buttons, "Plot" button create 4 plots on 4 different Widget. "Clear" button must clear this 4 plots. I try to write some code but it don't run. How can I create this clear button? Thank you.</p>
  
  <p>This is the main of my app:</p>
  
  <pre><code>import sys
  from Import_fsa import import_fsa
  from PyQt4 import QtCore, QtGui
  from PyQt4.QtGui import QFileDialog
  from Vannucci_Gemignani import Ui_MainWindow
  
  
  class GUI_fsa(QtGui.QMainWindow):
      def __init__(self):
  
          QtGui.QMainWindow.__init__(self)
          self.ui=Ui_MainWindow()
          self.ui.setupUi(self)
  
          self.ui.Button_Browse.clicked.connect(self.Browse)
          self.ui.Button_Plot.clicked.connect(self.Plot)
          self.ui.Button_Clear.clicked.connect(self.Clear)
  
      def Browse(self):
  
          fname=QFileDialog.getOpenFileName()
          if fname=='':  #se non viene selezionato nessun file, fname è
              return     #nullo, generando quindi un errore nell'import fsa
  
          self.ui.lineEdit.setText(fname)
  
  
  
  
      def Plot(self):
          if self.ui.lineEdit.text()=='':
              QtGui.QMessageBox.information(None,'Warning','Select fsa File',QtGui.QMessageBox.Ok)
              return
  
          data_set=import_fsa(self.ui.lineEdit.text())        
  
          self.ui.widget.canvas.ax.clear()
          self.ui.widget_2.canvas.ax.clear()
          self.ui.widget_3.canvas.ax.clear()
          self.ui.widget_4.canvas.ax.clear()
  
          self.ui.widget.canvas.ax.plot(data_set[0])
          self.ui.widget_2.canvas.ax.plot(data_set[1])
          self.ui.widget_3.canvas.ax.plot(data_set[2])
          self.ui.widget_4.canvas.ax.plot(data_set[3])
  
          self.ui.widget.canvas.draw()
          self.ui.widget_2.canvas.draw()
          self.ui.widget_3.canvas.draw()
          self.ui.widget_4.canvas.draw()
  
      def Clear(self):
          self.ui.widget.canvas.ax.clear()
          self.ui.widget_2.canvas.ax.clear()
          self.ui.widget_3.canvas.ax.clear()
          self.ui.widget_4.canvas.ax.clear()
  
  
  if __name__ == "__main__":
      app = QtGui.QApplication(sys.argv)
      MainWindow = GUI_fsa()
      MainWindow.show()
      sys.exit(app.exec_())
  </code></pre>