Makie: Is there an easy way to combine several figures into a new figure without re-plotting?

Just to add an example as I think I worded this quite confusingly:

function heatmaps(f = Figure())
    for i in 1:2, j in 1:2
        heatmap(f[i, j], rand(10, 10))
    end
    f
end

heatmaps()

function lineplots(f = Figure())
    lines(f[1:3, 1], randn(10))
    lines(f[2:3, 2], randn(10))
    lines(f[1, 2:3], randn(10))
    lines(f[2, 3], randn(10))
    lines(f[3, 3], randn(10))
    f
end

lineplots()

let
    f = Figure()
    heatmaps(f[1, 1])
    lineplots(f[1, 2][1, 1])
    heatmaps(f[1, 2][2, 1])
    f
end

15 Likes