Plots.jl equivalent to Matlab's "axis padded"?

Would anyone happen to have it, hopefully a one liner?

What I want is that no plotted data is touching an edge and I want it done automatically, without having to think about it.

I am using Plots.jl

Kind regards

using Plots; gr()
x = 0:12
plot(x, sin, lt=:step, framestyle=:box, label=false)

that is the default behaviour. In case a tight plot is required, add argument: widen=false

1 Like

Thanks, that makes the plot I am making a bit better.

Still not completely what I want, since the box around it is not “square” but rectangular. Minor issue at this point though - thanks again!

You can add argument: size=(600,600)