显示图jupyter注B

2024-04-26 10:02:02 发布

您现在位置:Python中文网/ 问答频道 /正文

在jupyter笔记本中,我看不到以下图表:

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

我只能看到matplotlib.axes._子批次AxesSubplot在0xda87c18


Tags: columnstrueindexplot图表笔记本jupytersort
1条回答
网友
1楼 · 发布于 2024-04-26 10:02:02

确保您已经执行了一个从以下魔术开始的单元格:

%matplotlib inline

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

相关问题 更多 >