My subplot results
My code
fig,ax = plt.subplots(rows,cols, figsize = [24,24])
plt.subplots_adjust(hspace=0, wspace=0)
for i in range(cols):
step
You have used figsize=[24,24]
to make it a square image. subplots_adjust
then makes each ax[i,j]
to stick to the adjacent one. But ax.imshow()
does not fill each ax
. In your sample above, if the vertical size of the image were larger, it would have filled the area alloted to that axes, but by distorting the image. If you want to try that out, use the command ax[0,i].imshow(a[ind,:,:],cmap='gray', aspect='auto')
: the aspect='auto'
part will stretch your images to fill the axes.
If you want the image aspect ratio to not be distorted, then you have to edit your figsize
accordingly.