# Changing the order of entries in the PlotLegends

I have a feeling this question has been asked before but here it is in the simplest form:

Plot[
{0.3 x^2, 0.5 x^2, 0.7 x^2}, {x, -3, 3},
PlotLegends -> "Expressions"
]


I tried the AbsoluteOptions@ Plot[{0.3 x^2, 0.5 x^2, 0.7 x^2}, {x, -3, 3}, PlotLegends -> "Expressions"] but could not find something to work with.

Question What I want to do is to write out the legend in reverse order so that colors match up. Is there a built-in option to rearrange PlotLegends entries.

Thanks.

• Or reverse the order of the functions, i.e., Plot[Evaluate[Reverse@{0.3 x^2, 0.5 x^2, 0.7 x^2}], {x, -3, 3}, PlotLegends -> "Expressions"] Oct 1, 2021 at 15:00

Use LineLegend with the option LegendLayout -> "ReversedColumn":

Plot[{0.3 x^2, 0.5 x^2, 0.7 x^2}, {x, -3, 3},
PlotLegends -> LineLegend["Expressions", LegendLayout -> "ReversedColumn"]]


Note: LegendLayout -> Grid @* Reverse gives the same result.

• Thanks. PlotLegends do appear in the Options[Plot] but not in AbsoluteOptions that I tried. What is the main difference between the two? Is there a hierarchy diagram I can study that can clarify the relationships between Plot and its various options?
– Syed
Oct 1, 2021 at 12:41
• @Syed, the short tutorial Manipulating Options may be useful.
– kglr
Oct 1, 2021 at 12:59