【发布时间】:2016-05-11 20:07:33
【问题描述】:
我正在使用类似于example here using imshow 的代码在 Jupyter 中绘制混淆矩阵热图
Matplotlib 设置为内联绘图。
这适用于输出到笔记本中的单元格,但我想不输出到单元格而是获取 PNG 数据(最好是原始数据,不保存到文件中)仅限这种情况,一般情况下(一般我希望 matplotlib 内联显示)。
我不太确定该怎么做;我见过的例子似乎本质上是全局的(例如,在导入 pyplot 之前调用 matplotlib.use())。
这可能吗?怎么样?
【问题讨论】:
标签: python matplotlib jupyter-notebook