%data = load('1hz.txt');

[count bins] = hist(data,min(data):1:max(data));

errorbar(bins,count,sqrt(count),'o','LineWidth',1);

hold on;

mu = mean(data);

x = min(bins):max(bins);

p = 100*mu.^x*exp(-mu)./factorial(x);

plot(x,p,'r','Linewidth',1.5);