I would like to get rid of the surrounding white margin in the following Makie Plot.
Any Idea ?
using GLMakie
nx,ny = 500,500
fig = Figure(resolution = (nx, ny), fontsize = 22)
ax = Axis(fig[1, 1]; aspect = DataAspect())
x = LinRange(-1,1,100)
lines!(ax,x,x)
hidedecorations!(ax)
tightlimits!(ax)
resize_to_layout!(fig)
GLMakie.save(joinpath("toto.png"),fig)
fig
![toto](https://global.discourse-cdn.com/julialang/original/3X/2/f/2f3c4cb6fea6e39da06fda6053b7a63ad0e6d2e1.png)
jules
2
That’s done with the figure_padding
attribute Figures · Makie
1 Like
Perfect !
Thank you very much.
I did not see the “button to edit” the documentation but the word “margin” may be included in the text
You can change the amount of whitespace around the figure…
As
You can change the amount of whitespace around the figure (margin)…
In order to help a search in the search engine (I did not think to search for “padding”)
Anyway thank you again !