I am using method on https://machinelearningmastery.com/visualize-gradient-boosting-decision-trees-xgboost-python/ to plot a XGBoost Decision Tree
from numpy
I found this workaround on github, which also gives better images with the drawback that you have to open the .png file after.
xgb.plot_tree(bst, num_trees=2) fig = matplotlib.pyplot.gcf() fig.set_size_inches(150, 100) fig.savefig('tree.png')