AxesLabel
是图形函数的一个选项,用以指定坐标轴的标签.
更多信息
- 可供使用的设置如下:
-
None 无标签 label 二维图形中 y 轴的标签,或三维图形中 z 轴的标签 {lblx,lbly} x 轴和 y 轴的标签 {lblx,lbly,lblz} x 轴、y 轴和 z 轴的标签 Automatic 用指定给 Plot 等的指定变量作为标签 - 缺省情况下,二维图形中的坐标轴标签放置于坐标轴的尾部. 在三维图形中,它们则放置于坐标轴的中部.
- 可指定任意表达式作为标签. 缺省情况下,它由 TraditionalForm 给出. 任意文本字符串能以 "text" 给出. »
范例
打开所有单元 关闭所有单元基本范例 (4)
Plot[Sinc[x], {x, 0, 10}, AxesLabel -> Sinc[x]]Plot3D[Abs[x + I y], {x, -4, 4}, {y, -4, 4}, AxesLabel -> Abs[z]]Graphics[Circle[], Axes -> True, AxesLabel -> {x, y}]用 Plot3D 的指定变量作为标签:
Plot3D[Sin[θ ρ], {θ, 0, 3}, {ρ, 0, 3}, AxesLabel -> Automatic]可以用 LabelStyle 指定全体标签类元素的所有风格:
Plot[2Sin[x], {x, 0, 10}, AxesLabel -> {x, 2Sin[x]}, LabelStyle -> Directive[Blue, Bold]]范围 (2)
缺省情况下,标签用 TraditionalForm:
Plot[Sinc[x], {x, 0, 10}, AxesLabel -> Sinc[x]]用 StandardForm 代替:
Plot[Sinc[x], {x, 0, 10}, AxesLabel -> StandardForm[Sinc[x]]]单一风格的标签可与 LabelStyle 连用, 并且有着更高的优先级:
Plot[Sin[x], {x, 0, 10}, AxesLabel -> {Style[x, Large, Bold, Red], Style[y, Large, Bold, Blue]}, LabelStyle -> Directive[Orange, Bold]]推广和延伸 (2)
Plot[Sinc[θ], {θ, 0, 10}, AxesLabel -> Automatic]label = Graphics[{Text["radian", {0, -2}], Pink, Disk[{0, 0}, 1, {0, 3Pi / 2}]}, ImageSize -> 30];Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, AxesLabel -> {label, None}]属性和关系 (1)
用 FormatType 指定总体输出格式:
Plot[Sin[x], {x, 0, 10}, AxesLabel -> {x, Sin[x]}, FormatType -> StandardForm]可能存在的问题 (1)
巧妙范例 (2)
Plot[{Sin[x], Cos[x]}, {x, 0, 10}, AxesLabel -> {Graphics3D[Sphere[], ImageSize -> 40], Graphics3D[Cylinder[], ImageSize -> 40]}]DynamicModule[{t = Automatic, s = Automatic}, Dynamic@Show[Plot[{Sin[x], Cos[x]}, {x, 0, 10}], AxesLabel -> {Labeled[Checkbox[Dynamic[t], {None, Automatic}], x], Labeled[Checkbox[Dynamic[s], {None, Automatic}], y]}, Ticks -> {t, s}, ImagePadding -> 40]]相关指南
-
▪
- 图形注解和外观 ▪
- 标签 ▪
- 图表标签、图例和注解 ▪
- 注释和组合图形
历史
1988年引入 (1.0) | 在以下年份被更新:2007 (6.0)
文本
Wolfram Research (1988),AxesLabel,Wolfram 语言函数,https://reference.wolfram.com/language/ref/AxesLabel.html (更新于 2007 年).
CMS
Wolfram 语言. 1988. "AxesLabel." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2007. https://reference.wolfram.com/language/ref/AxesLabel.html.
APA
Wolfram 语言. (1988). AxesLabel. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/AxesLabel.html 年
BibTeX
@misc{reference.wolfram_2026_axeslabel, author="Wolfram Research", title="{AxesLabel}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/AxesLabel.html}", note=[Accessed: 09-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_axeslabel, organization={Wolfram Research}, title={AxesLabel}, year={2007}, url={https://reference.wolfram.com/language/ref/AxesLabel.html}, note=[Accessed: 09-August-2026]}