I have 12 plots of size (400px,400px).
Each one individually looks fine. But when composing them into a grid(1,12), they start to overlap and
the y-labels and ticks have too much distance for the y-axis.

I know that I can fix the overlap by defining a margin. But I don’t know how to move the y-labels and ticks closer to the y-axis? Is there some trick?

function make_plot(N,M)
plotsize = (400,400)
plts = [plot(1:10, ylabel="Some Text", plotsize=plotsize) for i in 1:N*M]
plot(plts..., layout=grid(N,M), size=plotsize .* (M,N))
end
make_plot(1,1)
#savefig("demo1.png")
make_plot(1,6)
#savefig("demo6.png")
make_plot(1,12)
#savefig("demo12.png")

Using the plotly() backend and the margin attribute, decent results are obtained:

using Plots; plotly()
using Plots.Measures
function make_plot(N,M)
plotsize = (M*400,N*400)
plts = [plot(rand(10), xlabel="X-axis ($i)", ylabel="Y-axis ($i)", color=i,
left_margin = 15mm, legend=false, plotsize=(400,400)) for i in 1:N*M]
plot(plts..., layout=(N,M), size=plotsize)
end
make_plot(1,12)

PS: there are 12 subplots but truncated here for better visualization (cursor shows reading on curve):