How to position data labels on a 3D scatter plot?

4 views (last 30 days)
Hi, I'm using scatter3 and labelling each data point, but the labels come up too close to the points. Is there any way of specifying that the labels are positioned slightly further away from the points they refer to? Thanks in advance! Rebecca

Answers (1)

Walter Roberson
Walter Roberson on 9 Jan 2016
If you are using text() then you might want to try changing the horizontal or vertical alignment; see http://www.mathworks.com/help/matlab/ref/text-properties.html
If you are using text() and the alignment is not enough, then you will need to add an offset to your coordinates. What offset to use will require some thought that takes into account the various axes view properties such as camera target, and the DataAspect, and the [XYZ]Limit properties, so that after the projection due to the view is taken into account, the label becomes far enough away.

Products

Community Treasure Hunt

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

Start Hunting!