# Makie: how to make plotted elements be exactly up to figure edges

**URL:** <https://discourse.julialang.org/t/makie-how-to-make-plotted-elements-be-exactly-up-to-figure-edges/136750>\
**Category:** Visualization\
**Tags:** question, makie\
**Created:** [April 17, 2026, 10:00am UTC](https://discourse.julialang.org/t/makie-how-to-make-plotted-elements-be-exactly-up-to-figure-edges/136750 "2026-04-17T10:00:39Z")\
**Posts on this page:** 4\
**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 17, 2026, 10:00am UTC](https://discourse.julialang.org/t/makie-how-to-make-plotted-elements-be-exactly-up-to-figure-edges/136750/1 "2026-04-17T10:00:39Z")

</div>

This is the figure I am producing:

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

but I want the left side of the plotted elements go up to exactly the very last pixel of the figure. I am not able to figure out how to achieve that. I am doing:

```julia
t = 0:100
x = cos.(t)
fig = Figure(padding = 0)
ax = Axis(fig[1,1])
lines!(ax, t, x)
hidespines!(ax)
hidedecorations!(ax)
xlims!(ax, t[1], t[end])
fig

```

but the left side always has some padding.

---

<div class="post-metadata">

**Author:** ![lilachint](https://avatars.discourse-cdn.com/v4/letter/l/ee7513/32.png) [@lilachint](https://discourse.julialang.org/u/lilachint)\
**Post date:** [April 17, 2026, 10:11am UTC](https://discourse.julialang.org/t/makie-how-to-make-plotted-elements-be-exactly-up-to-figure-edges/136750/2 "2026-04-17T10:11:59Z")

</div>

Maybe `Figure(; figure_padding = 0)`?

---

<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 17, 2026, 10:21am UTC](https://discourse.julialang.org/t/makie-how-to-make-plotted-elements-be-exactly-up-to-figure-edges/136750/3 "2026-04-17T10:21:38Z")

</div>

> [@lilachint](#):
>
> figure\_padding

Thanks, this always gets me. I was using `padding` instead. False alarm!!!

---

<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 17, 2026, 5:56pm UTC](https://discourse.julialang.org/t/makie-how-to-make-plotted-elements-be-exactly-up-to-figure-edges/136750/4 "2026-04-17T17:56:25Z")

</div>

It’s a bit dumb but the keywords for the `Figure` theme are top-level in Makie (because it’s kind of a `Scene` just with a layout). So because `padding` on its own in the theme would be a bit nondescript, the key is `figure_padding`..
