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:

Introduced in 2012
 (9.0)