The following code results in a figure saved with large white spaces around it, while there is enough space to stretch the axes.
import matplotlib.pyplot as plt
import numpy as np
X = np.arange(-5, 5, 0.25)
Y = np.arange(-5, 5, 0.25)
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R)
fig, ax = plt.subplots(1, 1, figsize=(10, 5), subplot_kw=dict(projection="3d"))
plt.subplots_adjust(0, 0, 1, 1, 0, 0)
surf = ax.plot_surface(X, Y, Z, linewidth=0, antialiased=False)
ax.view_init(elev=20, azim=-45, roll=0)
ax.set_box_aspect([5, 1, 1]) # Aspect ratio
ax.set_aspect("auto")
plt.show()
How do I stretch the plot? As both the data and box aspect ratios are free to adjust, I'd expect to have a solution that fills the entire available space.
Not that I do not want to use the bbox_inches='tight' when saving the plot, as the figure is already prepared at the right size to be inserted in a paper.

