Code covered by the BSD License  

Highlights from
choose_transect_limits

image thumbnail
from choose_transect_limits by Kevin Bartlett
GUI for choosing time limits of oceanographic transects

repositiongui(LeftAndBottom,varargin)
function repositiongui(LeftAndBottom,varargin)
%
% repositiongui.m--Repositions the gui figure window at the location given
% by the LeftAndBottom vector, which is [left bottom] of the lower,
% left-hand corner of the figure in normalised units.
%
% Syntax: repositiongui(LeftAndBottom,<FigHndl>)
%
% e.g.,   repositiongui([.1 .2])

% Developed in Matlab 6.5.0.180913a (R13) on SUN OS 5.8.
% Kevin Bartlett(kpb@hawaii.edu), 2002/10/11, 17:17
%------------------------------------------------------------------------------

% Handle input arguments.
if nargin == 2
   FigHndl = varargin{1};
elseif nargin == 1
   FigHndl = gcf;
else
   error([mfilename '.m--Incorrect number of input arguments.'])
end % if

OrigUnits = get(FigHndl,'units');
set(gcf,'units','normalized');
OrigPos = get(FigHndl,'position');
set(FigHndl,'position',[LeftAndBottom OrigPos(3) OrigPos(4)]);
set(FigHndl,'units',OrigUnits);

Contact us at files@mathworks.com