Home > NoiseTools > nt_widthlines.m

nt_widthlines

PURPOSE ^

nt_widthlines(h,permutation) - apply different widths to lines of plot

SYNOPSIS ^

function nt_widthlines(h,widths)

DESCRIPTION ^

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

 Colors are applied to children of h in reverse order (ie in order of plot
 commands).  May produce unexpected results if there are childern other
 than plot lines.\
 
 NoiseTools

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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 % Colors are applied to children of h in reverse order (ie in order of plot
0008 % commands).  May produce unexpected results if there are childern other
0009 % than plot lines.\
0010 %
0011 % NoiseTools
0012 
0013 if nargin<1 || isempty(h); h=gca; end
0014 if nargin<2; error('!'); end
0015 
0016 c=get(h,'children');
0017 
0018 for k=1:numel(c);
0019     set(c(numel(c)-k+1),'linewidth', widths(k))
0020 end
0021

Generated on Mon 24-Feb-2014 14:13:21 by m2html © 2005