# How to put a title to PlotLegends?

I want to put a title to the plotlegends I am using. I get a solution here which says to use PlotLegends -> SwatchLegend[{0, 3.3, 6.7, 10, 13, 17, 20}, LegendLabel -> "mu"]. But I also want to place the legends where I want like using PlotLegends -> Placed[Range[1, 6, 1], {0.2, 0.3}].

How can I do both?

Edit: As the answer was given, the wrapping works, but there is still a problem, i.e my plot looks like this:

Where I want to name the legends as "H". But when I do that Swatchlegend thing it becomes like this :

I want to keep the markers and colors same. What should I do?

• parametricData = Table[100 - t*x^2, {t, .1, .6, 0.1}, {x, 0, 8}]; ListLinePlot[parametricData, PlotMarkers -> Automatic, PlotLegends -> Placed[PointLegend[Automatic, Range[1, 6, 1], LegendLabel -> "H"], {.2, .4}]] ? Commented Sep 12, 2020 at 5:24

You are probably looking for PointLegend, but you should provide more details so others can reproduce your results.

mu = {0, 3.3, 6.7, 10, 13, 17, 20};
pl = PointLegend[mu, LegendLabel -> "mu", LegendFunction -> "Frame",
LegendLayout -> "Row", LegendMarkers -> Automatic];
fns = Table[n^(1/p), {p, 7}, {n, 10}];
ListLinePlot[fns, PlotMarkers -> Automatic,
PlotLegends -> Placed[pl, Top]]


You can wrap Placed around the legend. Here's an example modified from the SwatchLegend documentation:

Plot[{Sin[x], Cos[x]}, {x, 0, 5},
PlotLegends -> Placed[SwatchLegend[{"first", "second"},
LegendLabel -> "legend title"], {0.2, 0.3}]]


• Okay, it gives what I wanted. But there is a problem. I have markers in my plot like triangle, circles tc which came from the 'PlotMarkers-> Automatic' comment. But here all the legend markers are squares. I know there is a option called 'LegendMarkers->' but it doesn't give what I want. Commented Sep 11, 2020 at 19:40

You can use PlotLegends - > Placed[labels, Top, Labeled[#, legendlabel, Top] &] .

mu = {0, 3.3, 6.7, 10, 13, 17, 20};
fns = Table[n^(1/p), {p, 7}, {n, 10}];

ListLinePlot[fns, PlotMarkers -> Automatic,
PlotLegends -> Placed[mu, Top, Labeled[#, Style["mu", 16], Top] &]]


You can further embellish the appearance using the third argument of Placed:

ListLinePlot[fns, PlotMarkers -> Automatic,
PlotLegends -> Placed[mu, Top, Panel @ Labeled[#, Style["mu", 16], Top] &]]


ListLinePlot[fns, PlotMarkers -> Automatic,
PlotLegends ->  Placed[mu, Top,
Framed[#, FrameStyle -> Directive[Thin, Gray],
RoundingRadius -> 5, ImageMargins -> 5] & @
Labeled[#, Style[Row[{Spacer[5], "mu"}], 24, "Section"], {{Top, Left}}] &]]