1

I´d like to draw an arrow with annotation in a specific axes in my GUI.

At the moment I have this GUI with two axes:

enter image description here

I already can draw an arrow to axes2 in my GUI but not to a chosen one. My Code so far:

enter image description here

How do I fit the annotation for example to axes1 and not tpo axes2?

arrow_p1 = [0.5 1]; % Startpunkt x1,y1
arrow_p2 = [0 -1]; % Breite des Pfeils = 0 und Länge des Pfeils mit Richtung -1 (nach unten)

h=annotation('textarrow','String','Mat. Fluss '); % arrow, doublearrow, textarrow

set(h,'parent', gca, 'position', [arrow_p1,arrow_p2], ... 
'HeadLength', 5, 'HeadWidth', 5, 'HeadStyle', 'vback2', ...
'Color', [0 0 0], 'LineWidth', 0.5);
Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Paul
  • 33
  • 5
  • I already solved this issue by creating a function for each axes. The code workes now for each axes. If you have a more elegant way to do so, I´m more than happy to see it. – Paul Jun 02 '18 at 09:49
  • Maybe call `axes(ax1)` before annitation? – Adiel Jun 02 '18 at 19:46

0 Answers0