Inside a plot, I want to place several textarrows to mark specific events on the timeline. However, their placement is not very precise. Consider this MWE:
startEndDtStr = ["01.08.2022 06:00:00", "11.08.2022 06:00:00"];
startEndDateTime = datetime(startEndDtStr);
daysTotal = days(diff(startEndDateTime));
dtVector = startEndDateTime(1):hours(1):startEndDateTime(2);
fh1 = figure('Position', [180 112 1150 650]);
plot(dtVector, sinpi(days(dtVector - startEndDateTime(1)))+1, 'LineWidth',1.5);
xArrow1 = days(datetime(2022,8,6,6,0,0) - startEndDateTime(1))/daysTotal;
annotation('textarrow', [xArrow1+.03 xArrow1], [1.7 1.0]./2, 'String',"Start Event", 'FontSize',14);
xticks(startEndDateTime(1):days(2):startEndDateTime(2));
Which produces this plot:
As you can see, the tip of the arrow does not end at [0.5, 0.5] in relative coordinates, or [August 06/2022/06:00, 1] in absolute coordinates. I suppose it has something to do with the plot area.
What would be the code to get it there?