[英]matplotlib using PyCharm on Windows won't plot graphs, no error
I run 我跑
import matplotlib.pyplot as plt
plt.plot(range(0, 10, 1)) #or "plt.plot(range(10))"
plt.show()
and it does nothing (except saying "Process finished with exit code 0" ). 并且它什么都不做(除了说“处理完成退出代码0”)。 I am using PyCharm, on Windows 7, I installed matplotlib via PyCharm's package manager. 我正在使用PyCharm,在Windows 7上,我通过PyCharm的包管理器安装了matplotlib。 I installed python 2.7 and PyCharm today (I practiced it for a month at codecadamy.com but I wanted to get accustomed to real conditions), so I am noob, and it can happen that the problem is trivial. 我今天安装了python 2.7和PyCharm(我在codecadamy.com上练习了一个月,但我想习惯于真实的条件),所以我是菜鸟,可能会发生这个问题很简单。
I tried various codes at matplotlib.org with no results. 我在matplotlib.org上尝试了各种代码而没有结果。
You can try uninstalling python, and reinstalling again. 您可以尝试卸载python,然后重新安装。
Or check out this link, it's similar to your question: matplotlib plot window won't appear 或者查看此链接,它与您的问题类似: matplotlib绘图窗口不会出现
Ok, apparently i made the stupidest mistake ever. 好吧,显然我犯了最愚蠢的错误。 I had multiple tabs opened, and I constantly run the first one, instead of the one i should have. 我打开了多个标签,我不断运行第一个标签,而不是我应该拥有的标签。 Should I delete question? 我应该删除问题吗? I'm so embarrassed. 我好尴尬。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.