카테고리 없음

Matlab 3D Zoom 버그

오늘보다 나은 내일 2015. 3. 26. 18:18

Matlab GUI에서 3D 상태의 Zoom을 하면 Axes Size 가 커져버린다. 


Google을 찾아보았으나 명확한 답이 없는 상황으로 보이고...


The 3-D zoom function uses an interactive picking routine to select a zoom point and then redraws the objects so as to bypass MATLAB's lack of 3D clipping, producing the desired result instead of the mess you get when just changing the axis limits on a surface.
하지만 생각보다 간단한 방법이 있을 것 같다. 

2D 화면으로 전환 후 확대, 이후 다시 원래 화면으로 복원.


이때 KeyPressFcn 을 이용하여 단축키를 생성,  zoom in / out, pan 을 시키면 된다.


[current_az,current_el] = view;

view([0 0 1]);

zoom(1.1);

view(current_az,current_el)