4
$\begingroup$

Say I have a plot like this:

ListPlot[Partition[Range@12, 1], PlotLegends -> Automatic]

The PlotLegends will wrap into 2 columns. However, I want to keep one column. In the help menu I found something like

ListPlot[Partition[Range@12, 1], 
 PlotLegends -> PointLegend[Automatic, LegendLayout -> "Column"]]

But there is no option how to suppress the wrapping – what I'd really like to do.

$\endgroup$

1 Answer 1

7
$\begingroup$
ListPlot[Partition[Range@12, 1], 
  PlotLegends -> SwatchLegend[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.