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

This is the figure I am producing:

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:

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.

1 Like

Maybe Figure(; figure_padding = 0)?

1 Like

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

1 Like

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..