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.
更多信息和选项
- 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.
范例
基本范例 (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]]技术笔记
相关指南
文本
Wolfram Research (2007),LegendBorder,Wolfram 语言函数,https://reference.wolfram.com/language/PlotLegends/ref/LegendBorder.html.
CMS
Wolfram 语言. 2007. "LegendBorder." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/PlotLegends/ref/LegendBorder.html.
APA
Wolfram 语言. (2007). LegendBorder. Wolfram 语言与系统参考资料中心. 追溯自 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: 13-September-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: 13-September-2026]}