How to align x axis in GR

You can check if the workaround in this post is useful.

In this case it could be implemented as follows:

using Printf, Plots; gr()

y1 = rand(10); y2 = rand(10);
n = length(y1)
x = 1:n
xstr = [@sprintf("%.1f", xi) for xi in x]
label1 = "A very loooooooooooooooong label"
label2 = "A short label"
xpad = 11   # adjust function of font size

a = plot(y1, label=label1, widen=false, xticks=(x, xstr))
plot!(x, zero(x) .+ ylims(a)[1], lc=:black, label=false)
plot!(zero(x) .+ xlims(a)[1], y1, lc=:black, label=false)
vspan!([x[n], x[n]+xpad], c=:white, lc=:white, label=false)

b = plot(y2, label=label2, widen=false, xticks=(x, xstr))
plot!(x, zero(x) .+ ylims(b)[1], lc=:black, label=false)
plot!(zero(x) .+ xlims(b)[1], y2, lc=:black, label=false)
vspan!([x[n], x[n]+xpad], c=:white, lc=:white, label=false)

plot(a,b, link=:x,layout=(2,1),xlims=(x[1],x[n] + xpad),legend=:topright,showaxis=false)