How do I keep the vertical arrow connected in a text arrow annotation?

4 次查看(过去 30 天)
When trying to add an text arrow to a plot I can get the text arrow to show up on the plot but the line is disconnected from the arrowhead.
x=1:.1:10;
y1 = sin(x*pi)/10;
figure
plot(x,y1)
tb = annotation('textarrow','String','Stim');
annoAx = gca;
tb.Parent = annoAx;
yRange = annoAx.YLim(2) - annoAx.YLim(1);
tb.Position = [5, .09, 0, -.04];
The problem seems to go away if the arrow is not perfectly vertical or if the y values are larger. Any suggestions?
PS I am using MATLAB R2014b

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by