0

I know how to write text in a plot, but this is a bit more complicated. Below is a rough illustration of how I want my text to be (I did it in plain paint).

Fig:

The desired result

I want to have a little long arrow and a box around the text.

Dev-iL
  • 23,742
  • 7
  • 57
  • 99
Aashu10
  • 49
  • 10
  • Do you want it to move around when you zoom/pan the plot? Also, what did you already try? – Dev-iL Oct 13 '16 at 07:53
  • 5
    [MATLAB **can definitely do this**](http://stackoverflow.com/a/17048745/2338750)! I guarantee you, [MATLAB can do this](http://stackoverflow.com/a/12716083/2338750). The question is, _can you?_ – Stewie Griffin Oct 13 '16 at 07:55
  • @Dev-iL, I don't want it to move around, because i just want to export it. All i did was ´text(x,y,'Text Here)´ . but it does not give me the freedom of the length of the arrow and the box around the text – Aashu10 Oct 13 '16 at 08:16
  • 1
    Good. You should use [`annotation`](https://www.mathworks.com/help/matlab/ref/annotation.html). I would add two annotations to get what you want - one of a square and one of an arrow. It's not ideal but should give you something that looks correctly after some trial and error. Keep in mind that the documentation is for a newer version than what you're using. – Dev-iL Oct 13 '16 at 08:18
  • Seems clear to me, i will be back after few attempts. – Aashu10 Oct 13 '16 at 08:27
  • 1
    Have a look at the [documentation](https://se.mathworks.com/help/matlab/ref/annotation.html#busqlx2). – Stewie Griffin Oct 13 '16 at 08:27

0 Answers0