tkinter and matplotlib: windows not showing until program closes under Linux

后端 未结 2 1361
囚心锁ツ
囚心锁ツ 2020-12-07 04:03

I\'ve written a program that basically plots different data upon pressing different buttons. The program works as intended under Windows, but when I tried to port it to Linu

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 04:30

    I was able to make it work simply by adding:

    matplotlib.use('TkAgg')
    

    This made the program work just as in Windows, without any other modifications necessary. I really need to learn the concepts posted by user3666197 for future projects though.

提交回复
热议问题