Resizing a Figure with CairoMakie

I am using CairoMakie, and I need a plot window which contains many subaxes. The number can change from time to time, and it is very hard to determine in advance the correct size and resolution for the Figure that holds this.

Is there any way I can resize my figure after finishing the plotting?

using CairoMakie
fig = Figure()
for i in 1:6
    ax = Axis(fig[i, 1]; aspect=DataAspect())
    heatmap!(ax, rand(10,10))
    ax = Axis(fig[i, 2]; aspect=DataAspect())
    heatmap!(ax, rand(10,10))

If resize!(fig, resolution) doesn’t work, resize!(fig.scene, resolution) should

1 Like

Excellent! resize!(fig.scene, resolution) worked. Thanks!