I want to create a single column LineLegend
with at least 12 different entries. Suppose that I define lists colors
and names
as follows:
colors = {Red, Magenta, Pink, Orange, Yellow, Green, Darker[Green],
Cyan, Blue, Purple, Black, Gray};
names = Table["Color " <> ToString[i], {i, 1, Length[colors]}];
If I use colors[[;; 10]]
to show only the first 10 entries in LineLegend
with LegendLayout -> "Column"
, I get a nice single column LineLegend
:
LineLegend[colors[[;; 10]], names, LegendLayout -> "Column",
LabelStyle -> {20, FontFamily -> "Arial"}]
However, if I show 11 or more entries, the legends become double-columned:
LineLegend[colors[[;; 11]], names, LegendLayout -> "Column",
LabelStyle -> {20, FontFamily -> "Arial"}]
LineLegend[colors, names, LegendLayout -> "Column",
LabelStyle -> {20, FontFamily -> "Arial"}]
How can I force LineLegend
to put the legend entries in a single column?
f[pairs_] := Grid[pairs]; LineLegend[colors, names, LegendLayout -> f, LabelStyle -> {20, FontFamily -> "Arial"}]
gives !Mathematica graphics $\endgroup$