【发布时间】:2016-04-04 09:29:57
【问题描述】:
我正在使用带有 Python 2.7 的 Jupyter 笔记本。像这样导入 matplotlib:
%matplotlib inline
import matplotlib.pyplot as plt
但我观察到一件事。当我在 Spyder 中使用 Python 时,我总是必须在 Python 脚本末尾使用 plt.show() 命令才能看到绘图。
在 Jupyter 中,我不需要这个命令来查看绘图。我确实收到此错误消息:
[<matplotlib.lines.Line2D at 0x91615d0>]
但它仍然是一个情节。这是为什么呢?
【问题讨论】:
标签: python matplotlib jupyter