2011-06-13 52 views
6

Mathematica文档指出:“三维图形中的文本放置在与指定的点{x,y,z}相对应的位置上。所有其他物体“。你如何定位相对于图像大小的文字?Mathematica:Graphics3D中相对于图像坐标的文本

这是怎么回事可以在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] 

Output

那些标签总是出现在那个位置,只要PlotRangeClipping设置为False。问题是,如果我切换到Graphics3D,如何让这些标签出现在特定位置。尝试一个简单的。

Framed[Show[ 
    Graphics3D[{Sphere[{0, 0, 0}, 1]}] 
], 
FrameMargins -> 0] 
+0

这一数字是没有意义的。另一个数字得到了参考? – jmlopez 2016-07-11 15:13:43

回答

6

在3D EpilogProlog使用扩展的2D坐标系统(对于所有基元):

Graphics3D[{Sphere[]}, Epilog -> Text["abcdef", Scaled[{0.1, 0.1}]]] 

enter image description here

相关问题