I have an array of plots (49 of them so it’s a fairly large figure)

plts = Plots.Plot[]
for i = 1:49
p = plot(...)
push!(plts, p)
end
plot(plts..., layout = 49, size=(2000, 2000), link=:x, margin=-1mm)

I have two questions here

Each plot gets its own x axis and y axis. Since the x-axis is the same for all plots, I’d like a single axis at the bottom of each column. I thought the link = :x would work, but I don’t know if I am using it correctly.

The y-tick-labels have a large gap between the y axis. (note, I am not talking about the axis label… but the actualy axis-tick values). Is there a way to reduce this margin?

using Plots
C = [0.0005, 0.01, -0.003, 0.00029]
inS, outS = 52, 49
dampen = 0.95
X=zeros(Float64, inS)
# Create synthetic input set.
for i ∈ 1:inS
X[i] = 0.125i
end
Y = zeros(Float64, (inS, outS))
# Create synthetic output set.
for k ∈ 1:length(Y[1,:]) # For each output Y[n].
for j ∈ 1:length(X) # For each input X[n].
Y[j, k]=(C[4]*(X[j]^3)+C[3]*(X[j]^2)+C[2]*X[j]+C[1]) * dampen
end
global dampen *= 0.95
end
plot(size=(1000, 1000))
for i ∈ 1:length(Y[1,:])
display(plot!(X,Y[:,i]))
end

This is interesting: it works for me with link=:all . I am wondering, if :
Is it also possible to link two subplots like subplot 1 and 2 in a plot(layout(2,2))?