I am using pyplot. I have 4 subplots. How to set a single, main title above all the subplots? title() sets it above the last subplot.
pyplot
title()
If your subplots also have titles, you may need to adjust the main title size:
plt.suptitle("Main Title", size=16)