LegendLayout

LegendLayout

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)

Format a legend horizontally:

Format a legend vertically:

Reverse the order:

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

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.

CMS

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_legendlayout, organization={Wolfram Research}, title={LegendLayout}, year={2012}, url={https://reference.wolfram.com/language/ref/LegendLayout.html}, note=[Accessed: 18-November-2024 ]}