I plotted few points using scatter and then label them using text. The position of these labels are same as the position of the points + some offset. Some of these text label overlap with each other and hence I moved them interactively (using mouse). I can check the new position of each of these text individually using property editor. However this is very time-consuming. Is there a better way to get the coordinates of all these text-label?
I plotted few points using scatter and then label them using text . The
Share
You can use findobj to get handles to text objects that are children of the current axes (or another handle… your choice):
Then you can get the positions of these text objects:
You may need to do a bit more work to associate each text object with its data point – I suggest taking advantage of the property system, perhaps via the
UserDatafield, for this, though there are many options.