I have a figure in MATLAB. Then I add a text to it by typing,
b = text(0.5, 0.5, 'Detector action', 'Rotation', -70, 'FontSize', 25);
But the text goes behind the figure (See below),

I also tried,
uistack(b, 'top');
but it didn't work.
Copyright © 2021 Jogjafile Inc.
The easiest way is not to bother with a
textat all, but instead use anannotation, since such an object will be (at least by default) above the axes (and thus, anything plotted inside them).The trick with
annotationobjects, is that counter-intuitively, we need not use aTextBox, but instead aTextArrow, while making the arrow itself invisible.For example: