title: Is there any way of annotating multiple plots using arrows with code in MATLAB?
body: <p>When doing multiple plots on the same figure in MATLAB, is there any way of annotating them such that the legend entries have arrows pointing to the plots that they're named for?</p>
  
  <p>Here's an example of what I have in mind. I'd like to do this using code.</p>
  
  <p><img src="https://i.stack.imgur.com/wrxOn.png" alt="enter image description here"></p>
  
  <p>Note that <a href="http://www.mathworks.com/help/matlab/ref/annotation.html" rel="nofollow noreferrer">the MATLAB website mentions a way to do this using the <code>annotation</code> function</a>. The problem with that function is that it takes x and y values (normalized for the plot) and puts the text there. Given that I am not certain where the datapoints will lie, this is unhelpful for what I want to do.</p>
  
  <p>I don't mind if the text shows up at a random place, actually. What's important is to have an arrow or some way of pointing to the plot that it is referencing.</p>