Skip to main content
added 20 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

You can extract color and label information from {p1,..., p10} and use it to construct a new legend to be used with Legended:

legendedplots = {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10};
plots = legendedplots[[All, 1]];
legend{colors, =labels} LineLegend[Sequence= @@Transpose[Cases[legendedplots, 
 Transpose[Cases[legendedplots,  Placed[LineLegend[a_, b_, ___], ___] :> 
   Flatten[{a, b}], All]]
legend = LineLegend[colors, labels, LegendLayout -> "Row"];

Legended[Show@plots, Placed[legend, Top]]

enter image description here

You can extract color and label information from {p1,..., p10} and use it to construct a new legend to be used with Legended:

legendedplots = {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10};
plots = legendedplots[[All, 1]];
legend = LineLegend[Sequence @@ 
 Transpose[Cases[legendedplots, Placed[LineLegend[a_, b_, ___], ___] :> 
   Flatten[{a, b}], All]], LegendLayout -> "Row"];

Legended[Show@plots, Placed[legend, Top]]

enter image description here

You can extract color and label information from {p1,..., p10} and use it to construct a new legend to be used with Legended:

legendedplots = {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10};
plots = legendedplots[[All, 1]];
{colors, labels} = Transpose[Cases[legendedplots, 
   Placed[LineLegend[a_, b_, ___], ___] :> Flatten[{a, b}], All]]
legend = LineLegend[colors, labels, LegendLayout -> "Row"];

Legended[Show@plots, Placed[legend, Top]]

enter image description here

Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

You can extract color and label information from {p1,..., p10} and use it to construct a new legend to be used with Legended:

legendedplots = {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10};
plots = legendedplots[[All, 1]];
legend = LineLegend[Sequence @@ 
 Transpose[Cases[legendedplots, Placed[LineLegend[a_, b_, ___], ___] :> 
   Flatten[{a, b}], All]], LegendLayout -> "Row"];

Legended[Show@plots, Placed[legend, Top]]

enter image description here