[SciPy-user] Fw: realtime axes flickers

mudit sharma mudit_19a@yahoo....
Wed Apr 29 09:27:39 CDT 2009


I tried reloading the figure and whole widget before plotting but the axes still flickers when I plot after reloading. Here's my code:

def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.plot_widget = QtGui.QWidget(self)
        self.plot_box = QtGui.QVBoxLayout(self.plot_widget)
        self.cfig = LiveFigure(figsize=(8, 4), dpi=100)
        self.canvas = LiveCanvas(self.cfig, self.plot_widget)
        self.plot_box.addWidget(self.canvas)
        self.plot_widget.setFocus()
        self.setCentralWidget(self.plot_widget)

    def reload_figure(self):
        self.plot_box.removeWidget(self.canvas)
        self.plot_widget.destroy()
        self.plot_widget = QtGui.QWidget(self)
        self.plot_box = QtGui.QVBoxLayout(self.plot_widget)
        self.cfig = LiveFigure(figsize=(8, 4), dpi=100)
        self..canvas = LiveCanvas(self.cfig, self.plot_widget)
        self.plot_box..addWidget(self.canvas)
        self.plot_widget.setFocus()
        self.setCentralWidget(self.plot_widget)




----- Forwarded Message ----
From: mudit sharma <mudit_19a@yahoo.com>
To: scipy-user@scipy.org
Sent: Friday, 24 April, 2009 18:41:30
Subject: realtime axes issues

I am trying to debug this issue may be someone can help. I have drawn multiple axes in one figure under "ipython -pylab " which contains line that are updated in realtime. Then I remove these axses using fig.delaxes from figures and draw another sets of axeses but the previous sets of axeses still exists and there line data keep getting updated in realtime. It causes current sets of axeses and x and y axis in figure to flicker. Any idea what might be causing this? 

Thanks!


      



More information about the SciPy-user mailing list