# WGLMakie plot size in Grid

**URL:** <https://discourse.julialang.org/t/wglmakie-plot-size-in-grid/123526>\
**Category:** General Usage\
**Tags:** makie\
**Created:** [December 6, 2024, 8:54am UTC](https://discourse.julialang.org/t/wglmakie-plot-size-in-grid/123526 "2024-12-06T08:54:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [December 6, 2024, 8:54am UTC](https://discourse.julialang.org/t/wglmakie-plot-size-in-grid/123526/1 "2024-12-06T08:54:08Z")

</div>

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

```julia
    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?

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [December 6, 2024, 9:40am UTC](https://discourse.julialang.org/t/wglmakie-plot-size-in-grid/123526/2 "2024-12-06T09:40:23Z")

</div>

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