title for all subplots matplotlib code example
Example 1: matplotlib title
import matplotlib.pyplot as plt
plt.title('TITLE')
Example 2: matplotlib subplots title
fig.suptitle('This is a somewhat long figure title', fontsize=16)
Example 3: set title matplotlib
import matplotlib.pyplot as plt
fig, axs = plt.subplots(1, 2)
axs[0].set_title('TITLE1')
Example 4: title subplot
import matplolib.pyplot as plt
for i in range(4):
plt.subplot(2,2,i+1).set_title('Subplot n°{}' .format(i+1))
plt.show()