/usr/share/octave/site/m/vlfeat/toolbox/plotop/vl_plotgrid.m is in octave-vlfeat 0.9.17+dfsg0-6build1.
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 36 37 38 | function h=vl_plotgrid(x,y,varargin)
% VL_PLOTGRID Plot a 2-D grid
% VL_PLOTGRID(X,Y) plots a grid with vertices (X,Y). X and Y are MxN
% matrices, with one entry per vertex.
%
% H=VL_PLOTGRID(...) returns the handle to the grid object.
%
% See also: VL_HELP().
washold = ishold ;
[M,N] = size(x) ;
hold on ;
xh = [x' ; nan*ones(1,M) ] ;
yh = [y' ; nan*ones(1,M) ] ;
xh = xh(:) ;
yh = yh(:) ;
xv = [x ; nan*ones(1,N) ] ;
yv = [y ; nan*ones(1,N) ] ;
xv = xv(:) ;
yv = yv(:) ;
lineprop = {} ;
if length(varargin) > 0
lineprop = vl_linespec2prop(varargin{1}) ;
lineprop = {lineprop{:}, varargin{2:end}} ;
end
h = line([xh' xv'], [yh' yv'],lineprop{:}) ;
if ~washold
hold off ;
end
|