Apr-15-2021, 11:02 AM
Hi,
I'm working on my first pyQt gui. I'm using QtDesigner.
I've added four widgets on which I draw live sensor data. I'm Using the matplotlib.animation class and everything is working quite well so far. I get the four individual graphs on each widget.
My problem ist, that the x and y axis autoscale according to the incoming data, but the tick labels are static.
From my research so far I know, that this is a result of the blit=True argument in the FuncAnimation() routine. If blitting is enabled the axis and so on are not plotted again.
I've tried to disable the blitting but by doing so there is no data plotted at all. The only thing that worked so far was to add a MplWidget.self.draw() to the update function. This leads to the fact, that the whole plot gets plotted again and again which ends up in performance problems. So not a good solution.
Is there any way to automatically refresh the x-tick labels in the animation and not losing too much performance?
Any help is appriciated
Thanks a lot
John
I'm working on my first pyQt gui. I'm using QtDesigner.
I've added four widgets on which I draw live sensor data. I'm Using the matplotlib.animation class and everything is working quite well so far. I get the four individual graphs on each widget.
My problem ist, that the x and y axis autoscale according to the incoming data, but the tick labels are static.
From my research so far I know, that this is a result of the blit=True argument in the FuncAnimation() routine. If blitting is enabled the axis and so on are not plotted again.
I've tried to disable the blitting but by doing so there is no data plotted at all. The only thing that worked so far was to add a MplWidget.self.draw() to the update function. This leads to the fact, that the whole plot gets plotted again and again which ends up in performance problems. So not a good solution.
Is there any way to automatically refresh the x-tick labels in the animation and not losing too much performance?
Any help is appriciated
Thanks a lot
John