I'm just wondering how to add annotation to the Matlab plot? Here is my code:
plot(x,y); annotation('textarrow',[x, x+0.05],[y,y+0.05],'String','my point','FontSize',14);
But the arrow points to the wrong place. How can i fix this? And any better idea for plot annotation?
Thank you and welcome!
EDIT:
I just saw from a reference document:
the annotation ('line', x, y) creates a line annotation object that extends from the point defined by x (1), y (1) to the point defined by x (2), y (2) specified in normalized units .
In my code, I would like the arrow to point to the point (x, y), which is drawn by the graph (), but the annotation interprets the values โโof x and y, as in normalized units of the figure. Therefore, I think this is causing the problem. How to specify the correct coordinates for annotation?
source share