function PlotTemplates(T,l)

% R = PlotTemplates(Templates, Start_wavelength_indices)
% 
% Templates = K member cell of templates
% s_w_i     = [1 x K] vector, starting poins of each template in Spectrum.

% Liam Pedersen, CMU, March 1999.
% version 1.0

if (nargin == 1) l = 1; end

K = length(T);
L = length(l);
if (L==1) l = l*ones(1,K); end


for i = 1:K
   t = T{i};
   M = length(t);
   lambda = l(i):(l(i)+M-1);
   plot(lambda, t - min(t) - 1, 'b');
   hold on
end
hold off
