WOLFRAM

is an option for legends that specifies how to format the legend content.

Details

  • Possible settings for LegendLayout are:
  • Automaticautomatic layout
    "Row"left-to-right layout
    "Column"bottom-to-top layout
    "ReversedRow"right-to-left layout
    "ReversedColumn"top-to-bottom layout
    flayout determined by function f
  • For LineLegend, PointLegend, and SwatchLegend, the argument to the function f is a table {{style1,label1},{style2,label2},} of styles and associated labels.
  • For BarLegend, the argument to f is a color function cf, range of values {min,max}, and list of contour values contours.

Examples

Basic Examples  (3)Summary of the most common use cases

Format a legend horizontally:

Out[1]=1
Out[2]=2

Format a legend vertically:

Out[1]=1

Reverse the order:

Out[2]=2
Out[3]=3

Write a function to construct a legend as a formatted table:

Out[2]=2
Wolfram Research (2012), LegendLayout, Wolfram Language function, https://reference.wolfram.com/language/ref/LegendLayout.html.
Wolfram Research (2012), LegendLayout, Wolfram Language function, https://reference.wolfram.com/language/ref/LegendLayout.html.

Text

Wolfram Research (2012), LegendLayout, Wolfram Language function, https://reference.wolfram.com/language/ref/LegendLayout.html.

Wolfram Research (2012), LegendLayout, Wolfram Language function, https://reference.wolfram.com/language/ref/LegendLayout.html.

CMS

Wolfram Language. 2012. "LegendLayout." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LegendLayout.html.

Wolfram Language. 2012. "LegendLayout." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LegendLayout.html.

APA

Wolfram Language. (2012). LegendLayout. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LegendLayout.html

Wolfram Language. (2012). LegendLayout. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LegendLayout.html

BibTeX

@misc{reference.wolfram_2025_legendlayout, author="Wolfram Research", title="{LegendLayout}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/LegendLayout.html}", note=[Accessed: 19-May-2025 ]}

@misc{reference.wolfram_2025_legendlayout, author="Wolfram Research", title="{LegendLayout}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/LegendLayout.html}", note=[Accessed: 19-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_legendlayout, organization={Wolfram Research}, title={LegendLayout}, year={2012}, url={https://reference.wolfram.com/language/ref/LegendLayout.html}, note=[Accessed: 19-May-2025 ]}

@online{reference.wolfram_2025_legendlayout, organization={Wolfram Research}, title={LegendLayout}, year={2012}, url={https://reference.wolfram.com/language/ref/LegendLayout.html}, note=[Accessed: 19-May-2025 ]}