Matplotlib python show() returns immediately

后端 未结 5 1202
梦毁少年i
梦毁少年i 2020-12-09 01:29

I have a simple python script which plots some graphs in the same figure. All graphs are created by the draw() and in the end I call the show() function to block.

T

5条回答
  •  既然无缘
    2020-12-09 02:06

    I had the same problem with this code below.

    import matplotlib.pyplot as plt
    
    plt.ion()
    fig,ax0 = plt.subplots(figsize=(5.3,4))
    
    plt.show()
    

    I removed plt.ion(), and the plot stays without closing automatically.

提交回复
热议问题