1import matplotlib.pyplot as plt
2import numpy as np
3
4fig=plt.figure()
5data=np.arange(900).reshape((30,30))
6for i in range(1,5):
7 ax=fig.add_subplot(2,2,i)
8 ax.imshow(data)
9
10fig.suptitle('Main title') # or plt.suptitle('Main title')
11plt.show()
12