function [z, pos]=getzoom(h) %GETZOOM Get the actual zoom. % % [Z, CPOS]=GETZOOM(AX) % % AX is the axes handle. % Z is the number of zooming % CPOS is the x,y coordinate of the center. % % See also IMZOOM % % Copyright (c) 1995 by Claudio Rivetti and Mark Young % claudio@alice.uoregon.edu, mark@alice.uoregon.edu % global H if nargin > 1 error('Too many input arguments.'); end if nargin == 0 h=gca; end axes(h); ax=axis; ss=scansize(H); z=log(ss/(ax(2)-ax(1)))/log(2); pos=[ax(1)+(ax(2)-ax(1))/2 ax(3)+(ax(4)-ax(3))/2];