I use the following code to create two axes; axes 'b' lies on top of axes 'a':
f=figure;a=axes;pcolor([1:4;1:4;1:4;1:4]);hold onb=axes;plot(1:10,'k');set(b,'color','none');
I then set the axes 'a' as the current axes without bringing it to the front of axes 'b', and use the GINPUT command as follows:
set(f,'currentaxes',a)ginput(1)
The x and y coordinates obtained are from axes 'b' instead of axes 'a'.
Best Answer