Matplotlib plots not displaying in sublimetext

前端 未结 5 2192
情话喂你
情话喂你 2020-12-09 04:30

I\'ve recently started using sublimetext 2, however I noticed today that the plt.show() function doesn\'t seem to work when run within sublimetext.

If

5条回答
  •  醉酒成梦
    2020-12-09 05:32

    My guess would be that Sublime Text 2 launches your code in its own environment, and only traps and displays the console output. The same problem exists when using GUI's, such as wxPython.

    Another work around is to open the command prompt and launch it manually (python file.py).

    EDIT: Here it states that "Under Windows, GUIs are supressed."

    EDIT 2: Here it lists a way to fix it, right at the bottom of the page.

提交回复
热议问题