1
$\begingroup$

I am trying to plot multiple curves with ListPlot. Since I have 12 curves to plot, the legend appears in two columns. I looked into this solution but it does not work with Listplot. Can anyone help?

Thanks, Saeid

$\endgroup$

1 Answer 1

2
$\begingroup$
SeedRandom[1234];

data = Reverse@Transpose[
    Sort /@ RandomReal[1, {10, 12}]];

If the ListPlot is Joined

ListPlot[data, Joined -> True,
 PlotLegends -> LineLegend[Automatic,
   LegendLayout -> {"Column", 1}]]

enter image description here

If not Joined

ListPlot[data,
 PlotLegends -> PointLegend[Automatic,
   LegendLayout -> {"Column", 1}]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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