Plot lines in the gaps between subplots

One way using Plots.jl layouts:

using Measures, Plots; gr()
l = @layout [a{0.45h}; b{0.05h}; c]
p1 = histogram(rand(1000), c=:reds, widen=false)
p2 = plot([0, 0.3, NaN, 0.75, 1], [0.0, 1, NaN, 1, 0], lc=:black, lw=3, frame=:none)
p3 = histogram(rand(100), c=:blues, widen=false)
plot(p1, p2, p3, layout=l, margin=0mm)

Plots_layouts_lines_between_subplots

1 Like