Use subplot with range:
img = imread('cameraman.tif'); figure; subplot(4,4,[2 3 6 7]);imshow(img); subplot(4,4,[9 10 13 14]);imshow(img); subplot(4,4,[11 12 15 16]);imshow(img);
And the result:

A matplotlib based on subplot2grid
import matplotlib.pyplot as plt plt.subplot2grid( (4,4), [0,1], 2, 2 ) plt.plot( x1, y1 ) plt.subplot2grid( (4,4), [2,0], 2, 2 ) plt.plot( x2, y2 ) plt.subplot2grid( (4,4), [2,2], 2, 2 ) plt.plot( x2, y2 )
It gives the following result:

source share