2016-11-17 136 views

回答

9

它看起来像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) 
+2

传递一个轴对我来说,只有最后一个变种似乎工作。 Thx – jcuypers

+0

^只有第二个选项适用于我。无论如何,谢谢你的答案! –