Jupyter显示没有plt.show()的情节
发布于 2021-01-29 16:35:55
我正在将Jupyter笔记本与Python 2.7一起使用。像这样导入matplotlib:
%matplotlib inline
import matplotlib.pyplot as plt
但是我观察到了一件事。当我在Spyder中使用Python时,我总是必须plt.show()
在python脚本的末尾使用命令才能查看图表。
在Jupyter中,我不需要此命令即可查看绘图。我确实收到此错误消息:
[<matplotlib.lines.Line2D at 0x91615d0>]
但它仍然会阴谋。这是为什么?
关注者
0
被浏览
42
1 个回答