function setzoomstatus(z) %SETZOOMSTATUS Set the zoom status for the current figure. % % SETZOOMSTATUS(ZOOMSTAT) % % SETZOOMSTATUS sets the zoomstatus to the value specified by the % ZOOMSTAT argument. % % ZOOMSTAT = 1 turns the zoom on % ZOOMSTAT = 0 turns the zoom off % ZOOMSTAT = -1 turns the zoom off and disable the menu item % % Called with no arguments, SETZOOMSTATUS, will toggle the zoom status. % % Claudio - 28 Sept, 1995 % % % Copyright (c) 1995 by Claudio Rivetti and Mark Young % claudio@alice.uoregon.edu, mark@alice.uoregon.edu % zi=findobj('tag', 'ZOOMITEM'); if nargin == 0 z = getzoomstatus; if z ~= -1 z=~z; end end if z == 1 zoom on; set(zi,'Label','Zoom off','Enable','on', 'userdata', z); end if z == 0 zoom off; set(zi,'Label','Zoom on','Enable','on', 'userdata', z); end if z == -1 zoom off; set(zi,'Label','Zoom on','Enable','off', 'userdata', z); end return