2011-06-13 56 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

相關問題