How to properly set aspect for Axis defined in multiple fig positions in Makie

Hello, I have the following figure structure

fig = Figure()

ax1 = Axis(fig[1,1])
ax2 = Axis(fig[1,2])
ax3 = Axis(fig[2,1])
ax4 = Axis(fig[2,2])
ax5 = Axis(fig[1:2,3])

colsize!(fig.layout, 3, Relative(0.6))

fig

where I’m able to change the size of the third column.

However, I want now to the an equal aspect for ax5, which however takes multiple positions in the figure, so colsize!(fig.layout, 3, Aspect(1:2, 1) doesn’t work.

I would avoid to set the aspect using the aspect argument, as this doesn’t inform the figure layout to resize. Indeed, I want the axis to be exactly aligned to the figure layout.

You can nest the left group so the big axis covers just one row:

fig = Figure(size = (700, 450))

gl = GridLayout(fig[1, 1])

ax1 = Axis(gl[1,1])
ax2 = Axis(gl[1,2])
ax3 = Axis(gl[2,1])
ax4 = Axis(gl[2,2])
ax5 = Axis(fig[1, 2])

poly!(ax5, Circle(Point2f(0, 0), 5))

colsize!(fig.layout, 2, Aspect(1, 1))

fig

2 Likes

Thanks. What if I can’t nest them because my layout is more complex?

What’s the actual layout then that you’re trying to create?