/usr/share/octave/site/m/vlfeat/toolbox/plotop/vl_figaspect.m is in octave-vlfeat 0.9.17+dfsg0-6+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | function vl_figaspect(a)
% VL_FIGASPECT Set figure aspect ratio
% VL_FIGASPECT(A) sets the current figure aspect ratio to A. It
% leaves the length of the shortest side unaltered. Both the
% screen and paper positions are affected.
%
% See also: VL_PRINTSIZE(), VL_HELP().
% Authors: Andrea Vedaldi
% Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
% All rights reserved.
%
% This file is part of the VLFeat library and is made available under
% the terms of the BSD license (see the COPYING file).
pos = get(gcf, 'Position') ;
if a >= 1
pos(3) = a * pos(4) ;
else
pos(4) = pos(3) / a ;
end
set(gcf,'Position',pos) ;
pos = get(gcf, 'PaperPosition') ;
if a >= 1
pos(3) = a * pos(4) ;
else
pos(4) = pos(3) / a ;
end
set(gcf,'PaperPosition', pos) ;
|