Python Forum
[PyQt] Refresh x-labels in matplotlib animation widget
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Refresh x-labels in matplotlib animation widget
#1
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
Reply


Messages In This Thread
Refresh x-labels in matplotlib animation widget - by JohnT - Apr-15-2021, 11:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Tkinter Matplotlib Animation Graph not rendering dimidgen 3 552 Mar-12-2024, 02:09 PM
Last Post: deanhystad
  [Tkinter] cutomtkinter matplotlib no x,y - xaxis and x,y - labels-> only graph and grid visible dduric 0 310 Feb-20-2024, 07:09 PM
Last Post: dduric
  tkinter - update/refresh treeview snakes 5 20,886 Dec-02-2023, 07:05 PM
Last Post: aynous19
  Refresh image in label after every 1s using simple function jenkins43 1 5,491 Jul-28-2019, 02:49 PM
Last Post: Larz60+
  Unable to update or refresh label text in tkinter jenkins43 3 6,599 Jul-24-2019, 02:09 PM
Last Post: Friend
  Tkinter refresh eduardoforo 4 12,565 Nov-14-2018, 09:35 PM
Last Post: woooee
  [Tkinter] Label doesn't refresh jollydragon 7 6,964 Jul-13-2018, 05:55 AM
Last Post: jollydragon
  [PyQt] enviremont refresh duende 2 3,423 May-13-2018, 09:49 AM
Last Post: duende
  pyqt main window refresh poblems duende 0 5,373 Apr-13-2018, 05:05 PM
Last Post: duende
  Refresh test in urwid.Text Stensborg 1 4,533 Mar-05-2018, 11:23 AM
Last Post: Stensborg

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020