fig = plt.figure(13)
plt.clf()
plt.plot(self.dat)
plt.ioff()

def main():
    app = QtGui.QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
if __name__ == '__main__':
    main()
Manual time loop control of FuncAnimation in matplotlib