IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
draw_zero_line.m
Go to the documentation of this file.
1 %>@ingroup graphicsapi
2 %>@file
3 %>@brief Draws zero line
4 %
5 %> @param x = xlim()
6 %> @param linewidth
7 function draw_zero_line(x, linewidth)
8 
9 if nargin < 1 || isempty(x)
10  x = xlim();
11 end;
12 if numel(x) < 2
13  x = [x-1, x+1];
14 else
15  x = x([1, end]);
16 end;
17 
18 if ~exist('linewidth', 'var')
19  linewidth = scaled(2);
20 end;
21 
22 len = length(x);
23 z = zeros(1, len);
24 plot(x, z, 'Color', [0, 0, 0], 'LineWidth', linewidth);
function scaled(in i)
function draw_zero_line(in x, in linewidth)