use xgboost.plot_tree can only plot one tree, default 0.
you can use code blow to plot all trees:
import math import matplotlib.pyplot as plt dump_list = bst.get_dump() num_trees = len(dump_list) cols = 4 rows = math.ceil(num_trees / cols) fig, axs = plt.subplots(rows, cols, figsize=(22, 60), sharex=False, sharey=False) for i in range(num_trees): row = int(i / cols) col = int(i % cols) ax = axs[row, col] plot_tree(bst, num_trees=i, ax=ax)
but I have not figout how construct those trees: which are boost trees and bagging trees?
the global layout is missing?