未在Jupyter中显示该图

问题描述 投票:0回答:1
import matplotlib.pyplot as plt
%matplotlib inline

fig = plt.figure()

我应该得到一个没有值的弹出式空图,但是在jupyter中仅显示输出内容:

<Figure size 432x288 with 0 Axes>

为什么没有显示图形?

matplotlib jupyter-notebook
1个回答
0
投票
代替%matplotlib inline,使用%matplotlib notebook在笔记本电脑中显示输出。

import matplotlib.pyplot as plt %matplotlib notebook fig = plt.figure()

© www.soinside.com 2019 - 2024. All rights reserved.