IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
format_yaxis.m
Go to the documentation of this file.
1 %>@ingroup graphicsapi
2 %>@file
3 %>@brief Actually, only formats the y-label
4 %
5 %> @param par Object or structure with "yname" and "yunit" properties
6 function format_yaxis(par)
7 
8 if isobject(par) || isstruct(par)
9  ff = fields(par);
10 
11  if ismember('yname', ff)
12  s = par.yname;
13  if ismember('yunit', ff)
14  if ~isempty(par.yunit);
15  s = [s ' (' par.yunit ')'];
16  end;
17  end;
18  ylabel(s);
19  end;
20 end;
function format_yaxis(in par)