Subplots in Plots.jl with separate legend

Apologies for reopening an older post, but I have a panel of plots (using Plots.jl) and specifying legend=true at the end while specifying the layout makes it very messy and shows giant legends that cover up most of the subplots. I’d like to specify a master legend i.e. one legend for all subplots, how would I do that?
Thank you!