function plotAmpCumHist(amplitudes,col)

if nargin < 2
    col = [0 0 0];
end

amplitudes = cell2mat(amplitudes);
n = length(amplitudes)/30
bins = 5:1:max(amplitudes);
N = hist(amplitudes,bins);
C = cumsum(N);
plot(bins,C/max(C)*100,'-','LineWidth',3,'Color',col);

ylim([0 101])
set(gca,'FontSize',16);
%legend('control (nacho361)','CNQX-treated (nacho364)','Location','SouthEast')
ylabel('Percentage of Events')
xlabel('Amplitude (pA)');

end
