PointLegend
PointLegend[{col1,…},{lbl1,…}]
generates a legend that associates points of colors coli with labels lbli.
PointLegend[{col1,…},Automatic]
generates a legend with placeholder labels for the colors coli.
PointLegend[{lbl1,…}]
represents a legend with inherited colors within visualization functions.
Details and Options
- PointLegend uses a point with color coli to identify label lbli with elements in a visualization or other legended item.
- Legended[expr,PointLegend[…]] can be used to apply a legend to an arbitrary expression expr.
- The following options can be given:
-
Joined False whether to draw a joined line with the points 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 shape of each point LegendMarkerSize Automatic size of the shape - PointLegend is displayed in StandardForm as a table. In InputForm, it is displayed as an explicit list of colors and labels.
- In PointLegend, 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 (3)
PointLegend is used to automatically create legends for ListPlot:
Scope (14)
Styles and Labels (9)
Use Directive to combine directives in a style:
PointLegend uses the shorter list of styles and labels:
Use Placeholder labels:
PointLegend remains unevaluated in other cases:
PointLegend normally displays in tabular form:
InputForm shows a textual form:
Presentation (5)
PointLegend line wraps automatically:
PointLegend automatically picks up styles when used in plots:
PointLegend automatically picks up PlotMarkers:
Change the default look of PointLegend and the position:
Use Legended to legend Graphics with PointLegend:
Options (28)
Joined (4)
LabelStyle (3)
All labels have the same default style:
LabelStyle applies to LegendLabel:
LegendFunction (4)
LegendLabel (5)
Add an overall label to the legend:
The label from LegendLabel is included in the argument to LegendFunction:
Construct a LegendFunction using Labeled that has a label outside:
Use LabelStyle to style a legend label:
Use Placed to change the legend label position:
Use the third argument in Placed to rotate the legend label:
LegendLayout (4)
LegendMargins (3)
Leave no space between the legend content and any boundaries from LegendFunction:
LegendMarkers (3)
LegendMarkers->Automatic matches the markers used by the plot:
Text
Wolfram Research (2012), PointLegend, Wolfram Language function, https://reference.wolfram.com/language/ref/PointLegend.html.
CMS
Wolfram Language. 2012. "PointLegend." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PointLegend.html.
APA
Wolfram Language. (2012). PointLegend. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PointLegend.html