Matplotlib python show() returns immediately

后端 未结 5 1209
梦毁少年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:00

    To replicate the matplotlib.show() behaviour with the tkagg backend when calling show() on the Figure object:

    import Tkinter as Tk
    import matplotlib.pyplot as plt
    fig = plt.figure()
    ... your plot commands...
    fig.show()
    Tk.mainloop()
    

提交回复
热议问题