【问题标题】:dispaying graph jupyter notebook [duplicate]显示图形 jupyter notebook [重复]
【发布时间】:2017-05-28 22:59:44
【问题描述】:

在 jupyter notebook 中我看不到这张图:

feature_importances = pd.Series(clf.feature_importances_, index=columns)
feature_importances.sort_values(inplace=True)
feature_importances.plot(kind="barh", figsize=(7,6))

我只能在 0xda87c18 看到 matplotlib.axes._subplots.AxesSubplot

【问题讨论】:

  • 你之前导入过%matplotlib inline吗?
  • 试试%matplotlib inline,检查here

标签: python pandas graph


【解决方案1】:

确保你已经执行了一个以这个魔法开始的单元格:

%matplotlib inline

这是 jupyter 中的 now required,而 ipython notebook 在启动 notebook 服务器时允许使用 --matplotlib 标志。

【讨论】:

    猜你喜欢
    • 2019-04-26
    • 2020-09-21
    • 2017-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-23
    相关资源
    最近更新 更多