How to plot a "global" legend when using subplots?

sylvaticus
Fri, 06 Dec 2024 10:54:36 +0000
Visualization

Take this example:

using Plots
pla = plot(x->x^2, title="Plot A", legend=nothing);plot!(x->x^3)
plb = plot(x->x^(1/2), title="Plot B", legend=nothing);plot!(x->x^(1/3))
plot(pla,plb,plb,pla,layout=(2,2),plot_title="Two plots", labels=["Serie1" "Serie2"],legend = :outerbottom)

Producing:

Is there a way to provide a single global legend, a bit like plot_title ?

4 posts - 4 participants

Read full topic