2016-12-21 582 views
-1

当我运行该文件时,图表不显示在我的控制台中。 see screenshotanaconda spyder无法显示图表

误差matplotlib.figure.Figure at 0x113d356d0

我怎样才能解决这个问题?我在我的MacBook(macOS sierra)中运行Spyder,并且该错误也出现在我的Windows 10系统中。

这是我的代码: 我成功地在我的旧macOS(capitan)中运行它,是否影响?

enter image description here

+0

你的代码是什么? – GeriTol

回答

1

我们需要看到你的代码给你确切的解决方案(所以请这样做),但是从我在图片中看到它似乎像你做这样的事情print(some_plot_object)。你必须做plt.show()来实际显示图形。像这样:

plt.plot(x,y) 
plt.show() 

没有打印!

+0

对不起,我这么晚了,你能再次检查我的代码吗?我认为它可能与我的macOS(capitan)系统有关系,因为我成功运行它直到我使用(Sierra) – ergg