patch graphic in gui



Hello,

I'm trying to develop a GUI with axes and several buttons.
First of all I'm loading a 'patch' graphic into the axes.
Then I switch to 'pan' mode to drag the patch around. After
switching to 'rotate3d' I can drag the graphic out of axis
area (for example over the pushbuttons).

For reconstruction:
Guide %open GUI Editor
- choose "Blank GUI"
- draw one axes and place to buttons
- in the "OpeningFcn" write:
x = [0 0;0 1;1 1];
y = [1 1;2 2;2 1];
z = [1 1;1 1;1 1];
tcolor(1,1,1:3) = [1 1 1];
tcolor(1,2,1:3) = [.7 .7 .7];
patch(x,y,z,tcolor);

in the pushbutton1_Callback function write:
pan

in the pushbutton2_Callback fcn write:
rotate3d

- run it
- switch to 'pan' mode. This is, how it is supposed to be.
- after switching to 'rotate3d' mode and rotating it, try
to move ('pan') the graphic again. It now can be moved
outside the axis area. That's not what I want.

Does anyone know how to fix this behaviour?

Thanks, Stefan
.


Quantcast