ChartLegends
是图表函数的选项,它指定用于图表元素的图例.
更多信息
- ChartLegends->{leg1,leg2,…} 用 legi 作为每个数据集中第 i
个元素的图例标签. - legi 可以是任何字符串、图形或其它静态或动态表达式.
- 任何指定的图例标签可以集合在一个图例中,并显示为图表的一部分.
- 图例的整体形式和外观可以通过 LegendAppearance 指定.
- None 指定无图例标签. 如果数据集中的元素多于指定的 legi,则其后的 legi 采用 None.
- 如果用 Legended 指定了数据集的明确图例, 则通过 ChartLegends 增加图例的指定.
- 图例的坐标或其它效果可以用 Placed 指定.
- ChartLegendsPlaced[leg,pos] 将图例 leg 置于 pos 指定的位置.
- pos 的可能形式有:
-
Above,Below,Before,After expr 边界框外的位置 {h,v} 水平位置 h 和垂直位置 v {{ex,ey},{lx,ly}} expr 中按比例缩放位置 {ex,ey} 上的图例中按比例缩放的位置 {lx,ly} - 可能的水平位置包括 Before、Left、Center、Right 和 After.
- 可能的垂直位置包括 Below、Bottom、Center、Top 和 Above.
- ChartLegends->{spec1,spec2,…} 用连续的 speci 指定嵌套数据集的连续维中的图例标签.
相关指南
-
▪
- 图表标签、图例和注解 ▪
- 图表和信息可视化 ▪
- 图例 ▪
- 标签 ▪
- 图表类型和布局
文本
Wolfram Research (2008),ChartLegends,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ChartLegends.html.
CMS
Wolfram 语言. 2008. "ChartLegends." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/ChartLegends.html.
APA
Wolfram 语言. (2008). ChartLegends. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/ChartLegends.html 年
BibTeX
@misc{reference.wolfram_2025_chartlegends, author="Wolfram Research", title="{ChartLegends}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ChartLegends.html}", note=[Accessed: 11-April-2026]}
BibLaTeX
@online{reference.wolfram_2025_chartlegends, organization={Wolfram Research}, title={ChartLegends}, year={2008}, url={https://reference.wolfram.com/language/ref/ChartLegends.html}, note=[Accessed: 11-April-2026]}