3-D Plot Covering Text

3 ビュー (過去 30 日間)
autumn
autumn 2019 年 6 月 6 日
コメント済み: autumn 2019 年 6 月 7 日
I have plotted a sphere with points on its surface. After labeling those points with text, I noticed a problem. If the orientation of the sphere is changed, the sphere overlaps the text so that the text is no longer visible. How can I correct this issue?
sdafasdf.PNG

採用された回答

Walter Roberson
Walter Roberson 2019 年 6 月 6 日
That can happen. text() is written into 3D space in a fixed location in data coordinates, and when you rotate, it is possible for the location to become hidden behind the object. That is expected to some degree: if you were to label cities on a globe then as you rotated the globe you would not typically want the cities "on the other side of the world" to have visible labels.
Reducing the alpha of the graphics object can reduce the problem, as then the graphics object does not hide the text as easily.
Sometimes, though, what you need is two or more axes, possibly linkaxes()'d, one containing the graphics and the one in front containing the text, since the one in front will overlay the one behind even through they are in the same data plane.
Or sometimes you should just use data tips.
  1 件のコメント
autumn
autumn 2019 年 6 月 7 日
After a lot of messing around with axes advice you gave, I finally decided to try to change the alpha value like you suggested. I'm very happy with the outcome! Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by