Julia plots layout

A workaround is to draw blank legends of appropriate length:

using Measures, Plots; gr()

l = @layout [a{0.5h}; b{0.25h}; c]

p1 = plot(sin, label="sin", legend=:outertopright)
plot!(cos, label="cos")

p2 = plot(cosh, c=:red)
plot!([1],[NaN], label=" "^4, c=:white, legend=:outertopright, fg_legend=:transparent)

p3 = plot(atan, legend=false, c=:green)
plot!([1],[NaN], label=" "^4, c=:white, legend=:outertopright, fg_legend=:transparent)

p = plot(p1, p2, p3, link=:x, layout=l, margin=0mm)
for i=1:2; plot!(p[i],xformatter=_->""); end; p

NB:
Simplifed the xtick labels removal part using this solution from the master @tbreloff.

3 Likes