I have a .jpg image with dimensions 440x219.
I use Matplotlib to make a surface plot of this image which seems to be working fine resulting in:
However, you can see that the squares got deformed into rectangles. My question is: how can I let Matplotlib render these images as squares instead (like in the original .jpg) image.
The code that I'm currently using to render:
fig = plt.figure(figsize=(5, 4))
ax = plt.axes(projection='3d')
ax.plot_surface(X, Y, img_binary, rstride=1, cstride=1, linewidth=0, cmap='gray')
ax.view_init(40, -20)
plt.show()
I'm assuming there must be some option available for this. Any pointers would be appreciated.