# How can I extend a GridPosition?

**URL:** https://discourse.julialang.org/t/how-can-i-extend-a-gridposition/107527
**Category:** Visualization
**Tags:** makie
**Created:** [December 12, 2023, 9:02pm UTC](https://discourse.julialang.org/t/how-can-i-extend-a-gridposition/107527 "2023-12-12T21:02:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vladdez](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vladdez/32/45806_2.png) [@vladdez](https://discourse.julialang.org/u/vladdez)
#### Post date: [December 12, 2023, 9:02pm UTC](https://discourse.julialang.org/t/how-can-i-extend-a-gridposition/107527/1 "2023-12-12T21:02:01Z")

</div>

I have plot with multiple subplots, each of it is a GridPosition.

```julia
f = Figure(resolution = (1200, 1400))
    ga = f[1, 1]
    gc = f[2, 1]
    ge = f[3, 1]
    gg = f[4, 1]
    gb = f[1, 2]
    gd = f[2, 2]
    gf = f[3, 2]
    gh = f[4, 2]

```

![image](https://global.discourse-cdn.com/julialang/original/3X/8/1/819510e98fdaf0ae637c03904b45b5824829ccf4.jpeg)  
How can I extend the green area toward the red area?

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [December 13, 2023, 9:03am UTC](https://discourse.julialang.org/t/how-can-i-extend-a-gridposition/107527/2 "2023-12-13T09:03:22Z")

</div>

Please read

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

And make an MWE - it’s pretty much impossible to help here as it’s not even clear which package(s) you are using.

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [December 13, 2023, 9:13am UTC](https://discourse.julialang.org/t/how-can-i-extend-a-gridposition/107527/3 "2023-12-13T09:13:12Z")

</div>

All sub `GridLayout`s have `alignmode = Inside()` by default, which means they place their inner content along the column lines and put the protrusion content in the gaps. Your red marked empty space is a result of that, the green plot has nothing to put in the gaps but the adjacent gridlayouts reserve that space. So you need to make the other ones not reserve the space. You can do that for example by setting `subgrid.alignmode = Outside(0)` which will treat all content as inner content basically, including the protrusions. Or if only some sides should have the treatment you can use `Mixed` instead and specify the sides yourself.
