'flow' layout in Makie

Is there any way to easily plot a grid of subfigures in Makie, similarly to e.g. 'layout = 4' in Plots.jl or do we need to do e.g. axs = [Axis(fig[i, j]) for i in 1:3, j in 1:3]
?

I don’t think there’s anything builtin…
I played with a small helper recently – usage:

datasets = [data1, data2, ...]
map(datasets, AutoGridLayout(nrows=3)) do data, pos
    image(pos, data)
end

implementation:

AutoGridLayout(fig; ncols=nothing, nrows=nothing) =
    if !isnothing(ncols)
        (fig.layout[I] for I in CartesianIndices((1:10^3, 1:ncols)) |> permutedims)
    elseif !isnothing(nrows)
        (fig.layout[I] for I in CartesianIndices((1:nrows, 1:10^3)))
    end

First impression – convenient in the simplest cases :slight_smile: