Is it possible to plot lines in the gaps between subplots? For example, the two black lines indicating that the bottom plot is a zoom-in view of the top plot:
Thanks for any help!
Is it possible to plot lines in the gaps between subplots? For example, the two black lines indicating that the bottom plot is a zoom-in view of the top plot:
Thanks for any help!
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)
Thank you! Eliminate the gap and squeeze into another subplot, simple but brilliant.
I want to add that in order to completely close the gaps between subplots, I need to use margin=-2mm
.