在 Windows 上使用 PyCharm 的 matplotlib 不会绘制图表,没有错误

matplotlib using PyCharm on Windows won't plot graphs, no error

我运行

import matplotlib.pyplot as plt
plt.plot(range(0, 10, 1)) #or "plt.plot(range(10))"
plt.show()

它什么都不做(除了说 "Process finished with exit code 0" )。我在 Windows 7 上使用 PyCharm,我通过 PyCharm 的包管理器安装了 matplotlib。我今天安装了python 2.7和PyCharm(我在codecadamy.com练习了一个月,但我想适应实际情况),所以我是菜鸟,而且可能发生问题很简单。

我在 matplotlib.org 尝试了各种代码,但没有结果。

您可以尝试卸载python,然后重新安装。

或查看此 link,它与您的问题类似: matplotlib plot window won't appear

好吧,显然我犯了有史以来最愚蠢的错误。我打开了多个选项卡,我经常 运行 第一个,而不是我应该打开的那个。我应该删除问题吗?我好尴尬。