fig, axs = plt.subplots(1, 2, constrained_layout=True, figsize=(5, 2)) axs[0].set_title('y=0.7\n$\sum_{j_n} x_j$', y=0.7) axs[1].set_title('y=None\n$\sum_{j_n} x_j$') plt.show()