Hello everyone,
I try to great a two row figure in Makie, where the first row contains 3 Axis
elements and the second row only two and the plot legend.
Sadly, I cannot figure out the logic behind Makie’s layout algorithm.
First consider the MWE:
function makeFigure()
fig = Figure(resolution = (300, 200), fontsize = 12, figure_padding = 2)
Axis(fig[1,1:2])
Axis(fig[1,3:4])
Axis(fig[1,5:6])
Axis(fig[2,2:3])
Axis(fig[2,4:5])
Box( fig[2,6])
colgap!(fig.layout, Relative(0.02))
fig
end
Which results in the figure
For some reasons Makie thinks it is cool that the upper right Axis has a different width than the other two in the top row. This happens also if I do not include the Box (which should be the legend later) or use for n ∈ 1:6 colsize!(fig.layout, n, Relative(1/6)) end
My second approach went along the line of:
function makeFigure()
fig = Figure(resolution = (300, 200), fontsize = 12, figure_padding = 2)
Axis(fig[1,1:2])
Axis(fig[1,3:4])
Axis(fig[1,5:6])
Axis(fig[2,:][1,2:3])
Axis(fig[2,:][1,4:5])
Box( fig[2,:][1,6])
colgap!(fig.layout, Relative(0.02))
fig
end
i.e., using a subgrip for the lower row.
This results in
Problem: There seems to be no way to set colgap
for subgrids and also the width of the lower axis is uncorrelated to the ones from the top row.
How can I convince Makie to simply put all Axis into the same width?