LegendBorderSpace
is an option for Legend that sets the space around the entire set of key boxes and text in the legend.
LegendBorderSpace
LegendBorderSpace
is an option for Legend that sets the space around the entire set of key boxes and text in the legend.
Details and Options
- To use LegendBorderSpace, you first need to load the Plot Legends Package using Needs["PlotLegends`"].
- The following settings can be given:
-
n a number Automatic determine border spacing automatically
Examples
Basic Examples (1)
Needs["PlotLegends`"]Normal placement of the keys in the legend:
Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, PlotLegend -> {"sine", "cosine"}, LegendBorderSpace -> Automatic]Increase the space between the keys and the edges of the legend:
Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, PlotLegend -> {"sine", "cosine"}, LegendBorderSpace -> 1]See Also
Tech Notes
Related Guides
Text
Wolfram Research (2007), LegendBorderSpace, Wolfram Language function, https://reference.wolfram.com/language/PlotLegends/ref/LegendBorderSpace.html.
CMS
Wolfram Language. 2007. "LegendBorderSpace." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/PlotLegends/ref/LegendBorderSpace.html.
APA
Wolfram Language. (2007). LegendBorderSpace. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/PlotLegends/ref/LegendBorderSpace.html
BibTeX
@misc{reference.wolfram_2026_legendborderspace, author="Wolfram Research", title="{LegendBorderSpace}", year="2007", howpublished="\url{https://reference.wolfram.com/language/PlotLegends/ref/LegendBorderSpace.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_legendborderspace, organization={Wolfram Research}, title={LegendBorderSpace}, year={2007}, url={https://reference.wolfram.com/language/PlotLegends/ref/LegendBorderSpace.html}, note=[Accessed: 15-June-2026]}