MATLAB: How to insert data info. in plot

data info to plotmanuallyprogramatically

Hello every one,
Please I have question I could not figure. I have a plot of two curves and I want to show the improvement obtained by the second curve. In other words, for example if the first curve has a datum of 60 and the second one has corresponding datum of 75, that means improvement 25%. Is there any way to show this number (25%) close to this datum on the plot programatically or manually from the plot.
Thanks in advance

Best Answer

You could simply put a text label next or close to a data point:
text(x_pos,y_pos,text_lab)
where x_pos and y_pos are the coordinates of the text box. text_lab is a string that you could put together from your measurement data (using num2str).