Interactive mode in matplotlib

后端 未结 2 1304
予麋鹿
予麋鹿 2021-02-04 16:16

I want to dynamically update the scatter plot based on the y-axis data received from a socket connection. I used python matplot lib in interactive mode to do this, but during dy

相关标签:
2条回答
  • 2021-02-04 17:09

    This page contains a couple of examples of dynamic plots with matplotlib and wxPython. And here is a version with PyQt.

    0 讨论(0)
  • 2021-02-04 17:15

    For this to work, you need to have a main loop for event handling, and your own event handler to redraw the plot when the window is resized or refreshed.

    You'll find many examples for this on the web, or in the tutorials.

    I think this is best handled by using a UI toolkit (e.g. wxPython), not using matplotlib interactive mode. I had a similar question in the past and got some good answers.

    0 讨论(0)
提交回复
热议问题