Gaussian blur on a 30x30 matrix

from scipy.ndimage import gaussian_filter from numpy.random import randint, seed import matplotlib.pyplot as plt seed(0) fig, ax = plt.subplots(3,5) A = randint(-255, 255, (30,30)) sigma = 0 for k in range(3): for j in range(5): Anew = gaussian_filter(A, sigma=sigma) ax[k,j].set_title('sigma = ' + str(sigma)) ax[k,j].matshow(Anew) ax[k,j].set_xticks([]) ax[k,j].set_yticks([]) sigma += 1 plt.tight_layout() plt.show()