I have four images, and I would like to visualize them without spaces (I am trying to project a map).
But I do not understand why 'wspace' is not working:
fig, axs = plt.subplots(2, 2, gridspec_kw={'hspace': 0, 'wspace': 0}) #, tight_layout = {'pad': 0})
(ax1, ax2), (ax3, ax4) = axs
ax1.imshow(map1)
ax1.axis('off')
ax2.imshow(map2)
ax2.axis('off')
ax3.imshow(map3)
ax3.axis('off')
ax4.imshow(map4)
ax4.axis('off')
# Hide x labels and tick labels for all but bottom plot.
for ax in axs.flat:
ax.label_outer()
plt.savefig('map4x4.png', dpi=150)
and what I visualize in the plot box of spyder is:
In which I clearly could see that the 'hspace=0' is working but not the 'wspace=0'. I must write 'wscpace=-0.6' to have non spaces between the images, but this is not a good code.
Also, when I see the image which has been saved, I can see even small white line between the vertical images:
Any ideas of what is happening? Why I have this big space between horizontal images? How could I fix it?