From: Michael on
Hello,

I am doing a plot with two axes using subplot. For adding furhter data I assign the handles of the two axes to variables. The input is as following:

clear
t=0:1e-2:10;
subplot(2,1,1)
ax1=gca;
plot(t,sin(t))
subplot(2,1,2)
ax2=gca;
ax2=plot(t,cos(t))

After this I draw an annotation:

annotation('arrow', [0.4, 0.2], [0.7, 0.7])

Now I want to draw an additional data set in the first axis and set this axis as current axis using:

axes(ax1)

At this point my annotation disappears. It seems that it has gone in a layer behind the upper axis. How can I make my annotation visible again?

Michael