# Makie: how to add some gap to the right end of a figure?

**URL:** <https://discourse.julialang.org/t/makie-how-to-add-some-gap-to-the-right-end-of-a-figure/136907>\
**Category:** Visualization\
**Tags:** question, makie\
**Created:** [April 28, 2026, 1:16pm UTC](https://discourse.julialang.org/t/makie-how-to-add-some-gap-to-the-right-end-of-a-figure/136907 "2026-04-28T13:16:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [April 28, 2026, 1:16pm UTC](https://discourse.julialang.org/t/makie-how-to-add-some-gap-to-the-right-end-of-a-figure/136907/1 "2026-04-28T13:16:31Z")

</div>

I have a figure that is composed of two columns. Each column is itself a `GridLayout`. I am having the problem that on the right end of the figure, the axes labels go over the figure boundary:

![image](https://global.discourse-cdn.com/julialang/original/3X/7/b/7bcb220326276258ad3ba9c54c8b1037d92a04f6.png)

How do I fix this? I don’t want to change the figure padding, because the left side is fine. I tried

```julia-auto
colgap!(fig.layout, 2, 10.0)

```

but this doesn’t work as the figure has only 1 gap.

---

<div class="post-metadata">

**Author:** ![JonasWickman](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@JonasWickman](https://discourse.julialang.org/u/JonasWickman)\
**Post date:** [April 28, 2026, 2:42pm UTC](https://discourse.julialang.org/t/makie-how-to-add-some-gap-to-the-right-end-of-a-figure/136907/2 "2026-04-28T14:42:10Z")

</div>

You can set figure padding to be different for each side:

```julia-auto
fig = Figure(figure_padding = (10.0, 0.0, 100.0, 50.0)) #(L, R, B, T)
ax = Axis(fig[1,1])
fig

```

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [April 28, 2026, 3:25pm UTC](https://discourse.julialang.org/t/makie-how-to-add-some-gap-to-the-right-end-of-a-figure/136907/3 "2026-04-28T15:25:58Z")

</div>

Thanks! What’s the way to change the figure padding after the figure has been created and all elements are plotted?

---

<div class="post-metadata">

**Author:** ![drandran12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drandran12/32/220647_2.png) [@drandran12](https://discourse.julialang.org/u/drandran12)\
**Post date:** [April 29, 2026, 8:23am UTC](https://discourse.julialang.org/t/makie-how-to-add-some-gap-to-the-right-end-of-a-figure/136907/4 "2026-04-29T08:23:39Z")

</div>

@Datseris How did you get the background for the (a), (b), (c) labels?

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [April 29, 2026, 8:41am UTC](https://discourse.julialang.org/t/makie-how-to-add-some-gap-to-the-right-end-of-a-figure/136907/5 "2026-04-29T08:41:13Z")

</div>

I use the [`label_axes!`](https://datseris.github.io/MakieForProjects.jl/dev/#MakieForProjects.label_axes!) function with keyword `add_box = true`

---

<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:** [April 29, 2026, 9:08am UTC](https://discourse.julialang.org/t/makie-how-to-add-some-gap-to-the-right-end-of-a-figure/136907/6 "2026-04-29T09:08:39Z")

</div>

The `figure_padding` goes into the `alignmode = Outside(...)` of the parent layout, so you can change it there via `fig.layout.alignmode = Outside(l, r, b, t)`.

More targeted, you could also set `ax.alignmode = Mixed(right = Makie.Protrusion(some_value))` only on the axis with the labels hanging out, this would instruct the layout to use a larger protrusion value on the right (it’s zero usually, as the x labels are not included in it for reasons)
