I have a matrix that I am making a surface plot of and then trying to overlay a rectangle on top of it. I can not get the rectangle to be displayed on top of the surface.
figure(6)h1= surface(M)h2= rectangle(0,0,3,3,'Facecolor','r')% I have tried to flip the children objects of the current axes but they did not work. I also tried uistack
% Is there something about a surface object that prevents anything from being rendered on top of it?
set(gca,'children',flipud(get(gca,'children')))
Best Answer