# How to put the legends above the figure and make them vertical? [closed]

The following way will put the legends on the right of the figure, and the three legends are vertically aligned.

Plot[{x, x^2, x^3}, {x, 0, 3}, Frame -> True,
PlotLegends -> {"long text 1", "long text 2", "long text 3"}]


The following way will put the legends above the figure, but the three legends are in one line, instead of three lines.

Plot[{x, x^2, x^3}, {x, 0, 3}, Frame -> True,
PlotLegends -> Placed[{"long text 1", "long text 2", "long text 3"}, Above]]


How to get a figure such that the legends are above the figure (like the second figure), and they are vertically aligned in multiple lines (like the first figure)?

-

## closed as off-topic by Öskå, Michael E2, ubpdqn, bobthechemist, rasherJul 3 '14 at 21:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Öskå, Michael E2, ubpdqn, bobthechemist, rasher
If this question can be reworded to fit the rules in the help center, please edit the question.

It's in the docs here. –  Öskå Jul 3 '14 at 10:50
I think a V9 reference might be more appropriate at this point: reference.wolfram.com/mathematica/ref/SwatchLegend.html –  Michael E2 Jul 3 '14 at 12:41

Plot[{x, x^2, x^3}, {x, 0, 3}, Frame -> True,
PlotLegends -> Placed[LineLegend[ColorData[1] /@ Range[3],
{"long text 1", "long text 2", "long text 3"},
LegendLayout -> "Column"], Above]]


-
Plot[{x, x^2, x^3}, {x, 0, 3}, Frame -> True,
PlotLegends ->
Placed[SwatchLegend[{"long text 1", "long text 2", "long text 3"},
LegendMarkers -> "Line",
LegendLayout -> "Column"], {{0.5, 1.3}, {0.5, 1}}]]


-