nt_widthlines(h,permutation) - apply different widths to lines of plot h: handle to plot (default:gca) widths: array of widths to apply to plot May produce unexpected results if there are childern other than plot lines. NoiseTools
0001 function nt_widthlines(h,widths) 0002 %nt_widthlines(h,permutation) - apply different widths to lines of plot 0003 % 0004 % h: handle to plot (default:gca) 0005 % widths: array of widths to apply to plot 0006 % 0007 % May produce unexpected results if there are childern other 0008 % than plot lines. 0009 % 0010 % NoiseTools 0011 0012 if nargin<1 || isempty(h); h=gca; end 0013 if nargin<2; error('!'); end 0014 0015 c=get(h,'children'); 0016 0017 for k=1:numel(c); 0018 set(c(numel(c)-k+1),'linewidth', widths(k)) 0019 end 0020