IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
resize_legend_markers.m
Go to the documentation of this file.
1 %>@ingroup graphicsapi
2 %>@file
3 %>@brief Resizes legend markers
4 %
5 %> @param size=12 size
6 %> @param flag_line=0 if 0, resizes 'MarkerSize', else resizes 'LineWidth'
7 function resize_legend_markers(size, flag_line)
8 
9 if ~exist('size')
10  size = 12;
11 end;
12 
13 if ~exist('flag_line')
14  flag_line = 0;
15 end;
16 
17 
18 h = legend;
19 if isempty(h)
20  irwarning('Figure has no legend!');
21 else
22  h_ = get(h, 'children');
23  for i = 1:length(h_)
24  hh_ = get(h_(i));
25  if strcmp(hh_.Type, 'line')
26  if flag_line
27  set(h_(i),'LineWidth', size);
28  else
29  set(h_(i),'MarkerSize', size);
30  end;
31  end;
32  end;
33 end;
function resize_legend_markers(in size, in flag_line)
function irwarning(in s)