Mathematica:Graphics3D中相对于图像坐标的文本
Mathematica文档指出:“三维图形中的文本放置在与指定点{x,y,z}的投影相对应的位置,文本在所有其他对象的前面绘制”。 你如何定位相对于图像大小的文字?
这是如何在2D中完成的:
custumLabels = Graphics[{
Text[Style["A", Red, Bold, 18], ImageScaled[{0.025, .95}]],
Text[Style["B", Red, Bold, 18], ImageScaled[{0.95, .05}]]}
];
Framed[Show[
Plot[
Sin[x] Exp[x], {x, 0, 10},
Frame -> True,
PlotRangeClipping -> False,
FrameLabel -> {"x", "y"}
],
custumLabels
],
FrameMargins -> 0]
只要PlotRangeClipping
设置为False
,那些标签将始终显示在该位置。 问题是,如果我切换到Graphics3D
,如何让这些标签出现在特定的位置。 尝试一个简单的。
Framed[Show[
Graphics3D[{Sphere[{0, 0, 0}, 1]}]
],
FrameMargins -> 0]
3D中的Epilog
和Prolog
使用缩放的2D坐标系(适用于所有基元):
Graphics3D[{Sphere[]}, Epilog -> Text["abcdef", Scaled[{0.1, 0.1}]]]
上一篇: Mathematica: Text in Graphics3D relative to image coordinates