/usr/share/octave/site/m/vlfeat/toolbox/plotop/vl_linespec2prop.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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | function prop=vl_linespec2prop(spec)
% VL_LINESPEC2PROP Convert PLOT style line specs to line properties
% PROPR = VL_LINESPEC2PROP(SPEC) converts the string SPEC to a cell
% array of properties PROPR. SPEC is in the format of PLOT().
%
% If SPEC is not a line spec, the string SPEC is returned unaltered
% as the only element of the cell array PROPR.
%
% See also: VL_PLOTFRAME(), PLOT(), VL_HELP().
% Authors: Andrea Vedaldi
% Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
% Copyright (C) 2013 Andrea Vedaldi
% 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).
prop = {} ;
if ~ ischar(spec)
error('SPEC must be a string') ;
end
spec_ = spec ;
switch spec(1:min(numel(spec),1))
case {'b' 'g' 'r' 'c' 'm' 'y' 'k' 'w'}
prop = {prop{:}, 'Color', spec(1)} ;
spec(1) = [] ;
end
switch spec(1:min(numel(spec),1))
case {'.' 'o' 'x' '+' '*' 's' 'd' 'v' '^' '<' '>' 'p' 'h'}
prop = {prop{:}, 'Marker', spec(1)} ;
spec(1) = [] ;
end
if isempty(spec)
return ;
end
switch spec
case {'-' ':' '-.' '--'}
prop = {prop{:}, 'LineStyle', spec} ;
otherwise
prop = {spec_} ;
end
|