LegendBorder
is an option for Legend that specifies the style of the line surrounding key boxes and text in a legend.
LegendBorder
LegendBorder
is an option for Legend that specifies the style of the line surrounding key boxes and text in a legend.
Details and Options
- To use LegendBorder, you first need to load the Plot Legends Package using Needs["PlotLegends`"].
- LegendBorder->style specifies that the border line style should use the specified graphics directive or list of directives.
Examples
Basic Examples (1)
Needs["PlotLegends`"]Use a black border around the legend:
Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, PlotLegend -> {"sine", "cosine"}, LegendBorder -> Black]Use a thick purple border around the legend:
Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, PlotLegend -> {"sine", "cosine"}, LegendBorder -> Directive[Thick, Purple]]Tech Notes
Related Guides
Text
Wolfram Research (2007), LegendBorder, Wolfram Language function, https://reference.wolfram.com/language/PlotLegends/ref/LegendBorder.html.
CMS
Wolfram Language. 2007. "LegendBorder." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/PlotLegends/ref/LegendBorder.html.
APA
Wolfram Language. (2007). LegendBorder. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/PlotLegends/ref/LegendBorder.html
BibTeX
@misc{reference.wolfram_2026_legendborder, author="Wolfram Research", title="{LegendBorder}", year="2007", howpublished="\url{https://reference.wolfram.com/language/PlotLegends/ref/LegendBorder.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_legendborder, organization={Wolfram Research}, title={LegendBorder}, year={2007}, url={https://reference.wolfram.com/language/PlotLegends/ref/LegendBorder.html}, note=[Accessed: 15-June-2026]}