MATLAB provides an interface to place custom elements on the graphics using the command
annotation. Lines, arrows, double-ended arrows, text arrows, textboxes, ellipses, and rectangles are all valid elements you can overlay on your basic graphic to convey information.
In this recipe, you will plot the standard normal distribution and add a text arrow to point out the location of the mean value on the graphic.
Perform the following steps:
plot(x,y1); line([mean1 mean1],get(gca,'ylim'));