【发布时间】:2017-04-01 13:52:45
【问题描述】:
xgboost.plot_importance(model, importance_type='gain')
我无法更改此图的大小。我想以适当的大小保存这个数字,以便我可以在 pdf 中使用它。我想要类似figize
【问题讨论】:
标签: python python-3.x matplotlib machine-learning xgboost
xgboost.plot_importance(model, importance_type='gain')
我无法更改此图的大小。我想以适当的大小保存这个数字,以便我可以在 pdf 中使用它。我想要类似figize
【问题讨论】:
标签: python python-3.x matplotlib machine-learning xgboost
看起来像plot_importancereturn an Axes object
ax = xgboost.plot_importance(...)
fig = ax.figure
fig.set_size_inches(h, w)
看起来你也可以传入轴
fig, ax = plt.subplots(figsize=(h, w))
xgboost.plot_importance(..., ax=ax)
【讨论】: