These examples show how to interactively add annotations to a graph and pin them to the axes.
Create a simple line plot.
x = linspace(1,10); plot(x,sin(x))
To change the location of an annotation, drag it. To modify the appearance of an annotation, right-click it and use the context menu. To view additional properties, open the Property Editor select Show Property Editor from the context menu.
Pin the text arrow and ellipse to the axes so that they stay associated with the same coordinates in the axes, even when you pan the axes or resize the figure. Right-click it and select Pin to Axes. Pin both ends of the text arrow.
Click the pan icon in the figure toolbar and pan the axes by dragging it. The text arrow and ellipse stay associated with the same points in the axes. To unpin an object, right-click it and select Unpin.