AlignmentPoint
是一个可选项,指定如何缺省对齐出现在 Inset 中的对象.
更多信息
- 如果 obj 有 AlignmentPoint->opos,则 Inset[obj,pos] 等价于 Inset[obj,pos,opos]. »
- AlignmentPoint 的典型设置为:
-
{x,y} 一个图中的普通坐标 Scaled[{x,y},…] 从 0 到 1 进行尺度缩放的坐标 ImageScaled[{x,y},…] 在一个完整图像上从 0 到 1 进行尺度缩放的坐标 Offset[{dx,dy},…] 以打印点为单位的绝对偏移 Center 等 {Center,Center},等 - x 坐标可以是数字、 Automatic 或 Left、 Center、 Right 或 Axis.
- y 坐标可以是数字、 Automatic 或 Top、 Center、 Bottom、 Baseline 或 Axis.
- Axis 对应于一个图形中轴的位置,或者是排字文本的中心线.
- Center 对应于关于整个图像居中的一个位置.
范例
打开所有单元 关闭所有单元基本范例 (1)
指定 Inset 中的坐标与所包括的图形中心对齐:
Table[Graphics[{Inset[Graphics[Circle[], ImageSize -> 30, AlignmentPoint -> {a, 0}], Center]}, ImageSize -> 70, Axes -> True, Ticks -> None], {a, {-1, 0, 1}}]Table[Graphics[{Inset[Graphics[Circle[], ImageSize -> 30, AlignmentPoint -> {0, a}], Center]}, ImageSize -> 70, Axes -> True, Ticks -> None], {a, {-1, 0, 1}}]范围 (1)
指定在 3D Inset 中利用 0, 1 坐标对齐的位置:
Table[Graphics[{Inset[Graphics3D[Sphere[], ImageSize -> 50, AlignmentPoint -> {a, 1 / 2}], {0, 0}]}, ImageSize -> 100, Axes -> True, Ticks -> None], {a, {0, 1 / 2, 1}}]Table[Graphics[{Inset[Graphics3D[Sphere[], ImageSize -> 50, AlignmentPoint -> {1 / 2, a}], {0, 0}]}, ImageSize -> 100, Axes -> True, Ticks -> None], {a, {0, 1 / 2, 1}}]推广和延伸 (1)
对齐点可以指定为一个 Inset 参数:
Table[Graphics[{Inset[Graphics[Circle[], ImageSize -> 30], Center, {a, 0}]}, ImageSize -> 70, Axes -> True, Ticks -> None], {a, {-1, 0, 1}}]Table[Graphics[{Inset[Graphics[Circle[], ImageSize -> 30], Center, {0, a}]}, ImageSize -> 70, Axes -> True, Ticks -> None], {a, {-1, 0, 1}}]文本
Wolfram Research (2007),AlignmentPoint,Wolfram 语言函数,https://reference.wolfram.com/language/ref/AlignmentPoint.html.
CMS
Wolfram 语言. 2007. "AlignmentPoint." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/AlignmentPoint.html.
APA
Wolfram 语言. (2007). AlignmentPoint. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/AlignmentPoint.html 年
BibTeX
@misc{reference.wolfram_2026_alignmentpoint, author="Wolfram Research", title="{AlignmentPoint}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/AlignmentPoint.html}", note=[Accessed: 08-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_alignmentpoint, organization={Wolfram Research}, title={AlignmentPoint}, year={2007}, url={https://reference.wolfram.com/language/ref/AlignmentPoint.html}, note=[Accessed: 08-August-2026]}