1 %% Copyright (C) 2010, 2011 Olaf Till <olaf.till@uni-jena.de>
3 %% This program is free software; you can redistribute it and/or modify
4 %% it under the terms of the GNU General Public License as published by
5 %% the Free Software Foundation; either version 3 of the License, or
6 %% (at your option) any later version.
8 %% This program is distributed in the hope that it will be useful,
9 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
10 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 %% GNU General Public License for more details.
13 %% You should have received a copy of the GNU General Public License
14 %% along with this program; If not, see <http://www.gnu.org/licenses/>.
16 function __plot_cmds__ (x, y, f)
26 if (length (size (f)) > 2)
33 lgnd = {'data', 'fit'};
35 id = num2str ((1:n).');
36 lgnd1 = cat (2, repmat ('data ', n, 1), id);
37 lgnd2 = cat (2, repmat ('fit ', n, 1), id);
38 lgnd = cat (1, cellstr (lgnd1), cellstr (lgnd2));
40 use_x = size (x, 1) == size (y, 1);
45 plot (x, y, 'marker', '+', 'linestyle', 'none', x, f);
47 plot (y, 'marker', '+', 'linestyle', 'none', f);