function plot_mean_raw_traces(mean_raw_traces,slopes_each_induction)
%takes the cell array of raw trace values from analyze_across... and plots 
%called from command line

plot_waveforms=0;
plot_summarybars=1;

groupA=[1 5 8 10 14 15 25 30];
groupB=[12 26];

mean_raw_traces{1}(81:end)=repmat(mean_raw_traces{1}(80),1,length(mean_raw_traces{1}(81:end)));     %this is the only induction trace with 8 ms pre-post interval

figure(22),clf,hold on
if plot_waveforms
     goodgroup=groupB,b=[];
	for z=1:length(goodgroup)
        m=mean_raw_traces{goodgroup(z)};
        plot(m,'k','linewidth',.1)
        b=[b;m(1:100)];
	end
	plot(mean(b),'k','linewidth',5)
	axis([40 100 -.5 2])
	set(gca,'xtick',[40 60 80 100],'xticklabel',[4 6 8 10],'ytick',[0 1 2]),xlabel('Time (ms)'),ylabel('Postsynaptic potential (mV/ms)')
end

if plot_summarybars
    groz=[];indivmeanz={};
    for grouper=1:2
        if grouper==1,goodgroup=groupA;else goodgroup=groupB;end
        sloz=[];
        for z=1:length(goodgroup)
            slo=sort(slopes_each_induction{goodgroup(z)});
            slo=slo(51:end);        %for choosing the largest x % of slopes
            sloz=[sloz mean(slo)];
        end
        groz(:,grouper)=[mean(sloz);mean(sloz)+standard_err(sloz);mean(sloz)-standard_err(sloz)];
        indivmeanz{grouper}=sloz;
    end
end        
rectangles_with_error_bars(groz(1,:),groz(2,:),groz(3,:),zeros(3,2),1,indivmeanz)