tight_layout in plt code example Example: plt tight layout fig, ax = plt.subplots() example_plot(ax, fontsize=24) plt.tight_layout()