LineLegend
✖
LineLegend
Details and Options


- LineLegend uses a line with style coli through a marker to identify label lbli with curves and markers in the visualization or other legended item.
- Legended[expr,LineLegend[…]] can be used to apply a legend to an arbitrary expression expr.
- The following options can be given:
-
Joined True whether to draw shapes LabelStyle Automatic style to use for labels LegendFunction Identity wrapper for the overall legend LegendLabel None overall label for legend LegendLayout Automatic legend layout to use LegendMargins Automatic space between legend content and boundaries LegendMarkers None markers to use to indicate each element LegendMarkerSize Automatic size of the shape - LineLegend is displayed in StandardForm as a table. In InputForm, it is displayed as an explicit list of colors and labels.
- In LineLegend, LegendLayout can have the following forms:
-
Automatic automatically determine layout "Row" display legend in a horizontal row "Column" display legend in a vertical column "ReversedRow" display reversed legend in a horizontal row "ReversedColumn" display reversed legend in a vertical column f apply f to construct the legend - The layout specification f is applied to the table of values {{col1,lbl1},…} to generate the legend.
- LegendFunction is applied to the legend, including any overall label and margins.

Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (15)Survey of the scope of standard use cases
Data (9)

https://wolfram.com/xid/0bdpvhp1e-7zb2uu


https://wolfram.com/xid/0bdpvhp1e-qsad3i


https://wolfram.com/xid/0bdpvhp1e-ms9afd

Use Directive to combine directives in a style:

https://wolfram.com/xid/0bdpvhp1e-7f8ems

LineLegend uses the shorter list of styles and labels:

https://wolfram.com/xid/0bdpvhp1e-g3500r


https://wolfram.com/xid/0bdpvhp1e-it0uis


https://wolfram.com/xid/0bdpvhp1e-i5wqh8

Use Placeholder labels:

https://wolfram.com/xid/0bdpvhp1e-qdp54s

LineLegend remains unevaluated in other cases:

https://wolfram.com/xid/0bdpvhp1e-l38f2m


https://wolfram.com/xid/0bdpvhp1e-ksvfi6


https://wolfram.com/xid/0bdpvhp1e-h3aw32


https://wolfram.com/xid/0bdpvhp1e-bh4fxi

LineLegend normally displays in tabular form:

https://wolfram.com/xid/0bdpvhp1e-6ocdfy

InputForm shows a textual form:

https://wolfram.com/xid/0bdpvhp1e-7hpx9k

Presentation (6)
LineLegend line wraps automatically:

https://wolfram.com/xid/0bdpvhp1e-vg4n9z


https://wolfram.com/xid/0bdpvhp1e-4b9374

LineLegend automatically picks up styles when used in plots:

https://wolfram.com/xid/0bdpvhp1e-uf4l73


https://wolfram.com/xid/0bdpvhp1e-tbvboz

LineLegend automatically picks up PlotMarkers:

https://wolfram.com/xid/0bdpvhp1e-m5qx2a


https://wolfram.com/xid/0bdpvhp1e-zo31rm

Change the default look of LineLegend and the position:

https://wolfram.com/xid/0bdpvhp1e-izn2jj

Use Legended to legend Graphics with LineLegend:

https://wolfram.com/xid/0bdpvhp1e-rxu5a

https://wolfram.com/xid/0bdpvhp1e-8orwid

Options (27)Common values & functionality for each option
Joined (3)
Joined->Automatic matches the behavior of the plot:

https://wolfram.com/xid/0bdpvhp1e-cbbdyd

Joined->False always draws no lines:

https://wolfram.com/xid/0bdpvhp1e-gv5n97

Joined can take a list of values:

https://wolfram.com/xid/0bdpvhp1e-b8jcss

LabelStyle (3)
All labels have the same default style:

https://wolfram.com/xid/0bdpvhp1e-fgbaqo


https://wolfram.com/xid/0bdpvhp1e-ch24bx


https://wolfram.com/xid/0bdpvhp1e-wnmckb


https://wolfram.com/xid/0bdpvhp1e-ra579r

LabelStyle applies to LegendLabel:

https://wolfram.com/xid/0bdpvhp1e-pav7m0

LegendFunction (4)

https://wolfram.com/xid/0bdpvhp1e-tro0iq

Use Panel:

https://wolfram.com/xid/0bdpvhp1e-lp3r45


https://wolfram.com/xid/0bdpvhp1e-mi290

https://wolfram.com/xid/0bdpvhp1e-kxwhmy

Create a legend with a drop shadow:

https://wolfram.com/xid/0bdpvhp1e-lz9rn7

https://wolfram.com/xid/0bdpvhp1e-eq0b64

LegendLabel (5)
Add an overall label to the legend:

https://wolfram.com/xid/0bdpvhp1e-ulbkcy

The label from LegendLabel is included in the argument to LegendFunction:

https://wolfram.com/xid/0bdpvhp1e-mpn4qb

Construct a LegendFunction using Labeled that has a label outside:

https://wolfram.com/xid/0bdpvhp1e-gtf4wb

Use LabelStyle to style the legend label:

https://wolfram.com/xid/0bdpvhp1e-654lkj

Use Placed to change the legend label position:

https://wolfram.com/xid/0bdpvhp1e-3evha3

Use the third argument in Placed to rotate the legend label:

https://wolfram.com/xid/0bdpvhp1e-9lvjlx

LegendLayout (4)

https://wolfram.com/xid/0bdpvhp1e-euws2l

Arrange the legend in a column:

https://wolfram.com/xid/0bdpvhp1e-upr59w

Reverse the direction of the legend:

https://wolfram.com/xid/0bdpvhp1e-t31b2l


https://wolfram.com/xid/0bdpvhp1e-1eovlz

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

https://wolfram.com/xid/0bdpvhp1e-yn6zux

https://wolfram.com/xid/0bdpvhp1e-nck35j

LegendMargins (3)
Leave no space between the legend content and any boundaries from LegendFunction:

https://wolfram.com/xid/0bdpvhp1e-tb3ydd

Specify a margin around the content:

https://wolfram.com/xid/0bdpvhp1e-l1rebw

Use different margins on different sides:

https://wolfram.com/xid/0bdpvhp1e-2vvnn3

LegendMarkers (3)
By default, no markers are drawn:

https://wolfram.com/xid/0bdpvhp1e-9dro5b

LegendMarkers->Automatic matches the markers used by the plot:

https://wolfram.com/xid/0bdpvhp1e-vr6vfn


https://wolfram.com/xid/0bdpvhp1e-om811t

Wolfram Research (2012), LineLegend, Wolfram Language function, https://reference.wolfram.com/language/ref/LineLegend.html.
Text
Wolfram Research (2012), LineLegend, Wolfram Language function, https://reference.wolfram.com/language/ref/LineLegend.html.
Wolfram Research (2012), LineLegend, Wolfram Language function, https://reference.wolfram.com/language/ref/LineLegend.html.
CMS
Wolfram Language. 2012. "LineLegend." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LineLegend.html.
Wolfram Language. 2012. "LineLegend." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LineLegend.html.
APA
Wolfram Language. (2012). LineLegend. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LineLegend.html
Wolfram Language. (2012). LineLegend. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LineLegend.html
BibTeX
@misc{reference.wolfram_2025_linelegend, author="Wolfram Research", title="{LineLegend}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/LineLegend.html}", note=[Accessed: 15-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_linelegend, organization={Wolfram Research}, title={LineLegend}, year={2012}, url={https://reference.wolfram.com/language/ref/LineLegend.html}, note=[Accessed: 15-April-2025
]}