MATLAB: How send to back patch objects in a graph

handle graphicspatch objectsstacking

Hi, I draw a graphic http://img196.imageshack.us/img196/3923/matlaboklausimas3.png I use is this code:
a1=[1 150];
a2=[1 180];
a3=[1 200];
z1=[1 150];
xk=[50 100];
zk=[20 150];
kx = [xk(1,1) xk(1,2) xk(1,2) xk(1,1);];
kz = [zk(1,1) zk(1,1) zk(1,2) zk(1,2);];
figure(20) plot(a1,z1,a2,z1,a3,z1)
set(gca,'XDir','reverse')
xlabel('X'); ylabel('Z');
axis([0 MAX_X+1 0 MAX_Y+1])
patch(kx(1,:),kz(1,:),'y')
How I can sent to back patch objects. I need to show all the lines

Best Answer

Simply change the order of objects in the children property of the axes object.
set(gca,'children',flipud(get(gca,'children')))