You can set the colsizes to Aspect which will result in an “overflowing” gridlayout if the figure doesn’t happen to have the perfect size. Then you resize the figure with the new function resize_to_layout!.
I’ve set the size here to the deliberately unfitting value (400, 400).
fig = Figure(resolution=(400,400), backgroundcolor = :gray80);
ax1 = Axis(fig[1,1], limits=(0,1,0,1))
ax2 = Axis(fig[1,2], limits=(0,3,0,1))
ax3 = Axis(fig[2,1], limits=(0,1,0,1))
ax4 = Axis(fig[2,2], limits=(0,3,0,1))
colsize!(fig.layout, 1, Aspect(1, 1.0))
colsize!(fig.layout, 2, Aspect(1, 3.0))
resize_to_layout!(fig)
fig
In this case, it gets resized to size (705, 400), so you were really close already with (700, 400) for your case.
This wouldn’t work with aspect = DataAspect(), because that just makes the axis itself smaller in its allotted space, but it doesn’t force the layout to fix that cell to an aspect ratio. That has to be done with colsize! or rowsize! on the layout level.
