Makie.jl: align first axis' boundary with ticklabels of second axis

I have the figure
Examples
in which I want to make best use of the available space, i.e., let subfigure (a) reach the right boundary.
Makie allocates space to xticklabels on the right hand side of the figures; here from the colorbar.
How do I tell Makie to do this :smiley:

A MWE would be

fig = Figure(resolution = (400, 250), fontsize = 19)

# ------------------------------
# Top Row
axis = Axis(fig[1, 1:4])
lines!(axis, [1:100;], cumsum(randn(100)))

# ------------------------------
# Bottom Row
for i ∈ 1:3
	axis = Axis(fig[2, i], ylabel = i == 1 ? "t" : "")
	i == 1 || hideydecorations!(axis)
	heatmap!(axis, [1:20;], [1:20;], randn(20,20))
end
Colorbar(fig[2,4], size = 10)
rowgap!(fig.layout, 4)
colgap!(fig.layout, 4)
	
fig

Adding alignmode = Outside() to the colorbar did exactly this.

Or more targeted Mixed(right = 0), I do the same with the colorbar in the layout tutorial here Layout Tutorial

1 Like