How can I manually adjust the position of each line legend (and for example align these pairs)? The legends become not aligned when the text lengths are different.

legend = LineLegend[
   ColorData[97, #] & /@ Range[6], {"First legend", "Second", "Third",
     "Fourth", "Fifth", "Sixth"}, LegendLayout -> {"Row", 2}, 
   Spacings -> {0.3, 2}];
Plot[{x, 2 x, 3 x, 4 x, 5 x, 6 x}, {x, 1, 10}, 
 PlotLegends -> Placed[legend, Top]]

Enter image description here


1 Answer 1


LegendLayout -> {"Column", 3}

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.