WGLMakie plot size in Grid

I’m using Bonito.Grid with Makie plots. I find that while Grid works generally as advertised, the Makie plots seem quite stubborn about their figure size, and do not generally “take the space available for them”, but rather seem to have a fixed size in pixel.

Eg. if I have

    PCard(p; kwargs...) = Card(p; padding="0px", margin="0px", kwargs...)
    Row(
        PCard(fig1, width="10%"),
        PCard(fig2, width="20%"),
        Col(slider, width="70%"))

Then the slider behaves as expected (when it has space), but fig1 / fig2 have a fixed size in pixel, even if I did not specify it in Figure(). Is there any way to make a Figure with a height that is 30% of the space?

There is WGLMakie.activate!(resize_to=:parent).
You can also set it per figure with:
WithConfig(fig; resize_to=:parent)

1 Like