'Figure doesn't fill the plot box

I'm facing a problem plotting my decision tree figure with python.

This is my code:

plt.figure()
tree.plot_tree(clf.best_estimator_, filled=True)
plt.show()

where clf.best_estimator_ is my DecisionTreeClassifier.

The box plot is like this: enter image description here

How can I make the decision tree representation fill the box??

The result I want is this:enter image description here

(I resized it manually)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source