Python Matplotlib hangs when asked to plot a second chart (after closing first chart window)

后端 未结 6 1102
不知归路
不知归路 2021-02-14 18:09

Weird behaviour, I\'m sure it\'s me screwing up, but I\'d like to get to the bottom of what\'s happening:

I am running the following code to create a very simple graph

6条回答
  •  星月不相逢
    2021-02-14 18:36

    As posted somewhere above:

    Use plt.draw() for all your plots except the last one.

    For your last plot, use plt.show()

    It's weird, but if you don't use plt.show() in the last one and try plt.draw() instead, you don't see any plots.

    Good luck with this!

提交回复
热议问题