|
"Yuri Geshelin" <geshelin@hotmail.com> wrote in message
news:ghbc5k$erp$1@fred.mathworks.com...
> Hi,
>
> I have two PATCH objetcs, e.g.
> ip(1) = patch([.2 .3 .3 .2],[.2 .2 .3 .3 ],'r');
> ip(2) = patch([.25 .35 .35 .25],[.25 .25 .35 .35 ],'g');
>
> the second is sitting on top of the first one, as it was created later. I
> want this to be the other way around, i.e. the first one on top. To
> achieve this, I am doing just blunt
>
> delete(ip)
> ip(2) = patch([.25 .35 .35 .25],[.25 .25 .35 .35 ],'g');
> ip(1) = patch([.2 .3 .3 .2],[.2 .2 .3 .3 ],'r');
>
> But is there a more natural way of flipping them? I checked the PATCH
> properties, but did not find anything to address this issue.
You can use UISTACK:
uistack(ip(1), 'up', 1)
or you can adjust the ZData property of one or both of the patches. If one
of the patches is at the default z level (corresponding to z = 0, I believe)
and the other is at level z = 0.1, the one at z = 0.1 will be on top of the
one at the default level.
--
Steve Lord
slord@mathworks.com
|