【发布时间】:2020-09-05 08:23:52
【问题描述】:
当我在 ipython 中使用 matplotlib 时,我没有得到任何情节。代码如下:
%matplotlib inline
import matplotlib.pyplot as plt
sns.set() # use Seaborn styles
births.pivot_table('births', index='year', columns='gender', aggfunc='sum').plot()
plt.ylabel('total births per year');
我得到一个输出:
<Figure size 432x288 with 1 Axes>
这是我在运行代码时得到的输出:
【问题讨论】:
-
任何帮助表示赞赏。
-
plt.show()呢? -
我在 IPython 上发生了类似的行为。我重新启动了 IPython,然后它工作了。
-
@PéterLeéh 它仍然显示相同的结果。
-
请原谅我对 miniconda 的无知,但它对我来说只是命令窗口。你真的在使用 iPython 编辑器吗?命令窗口不会显示 matplotlib 输出。
标签: python pandas matplotlib plot miniconda