Hot answers tagged


Actually the answer is already given in the documentation for SwatchLegend. All you need to do is to wrap Legended around the Show: Legended[ Show[ plot1, plot2, PlotRange -> All ], SwatchLegend[ {Red, Yellow}, {"A", "B"} ] ] Note: Should the legend become larger and is entered by hand, using Transpose may make this easier, e.g. SwatchLegend @@ ...


I would suggest creating the legend separately and combine with Grid. Grid[{{Show[plot1, plot2, PlotRange -> All], SwatchLegend[{Red, Yellow}, {"plot1", "plot2"}]}}]

Only top voted, non community-wiki answers of a minimum length are eligible