%pltpdfdat.m
% M-file to plot to prob.density functon(pdf) of data

  clf
  hold off

  % Make sure we can access "signature" function
  %addpath('/tool/local/matlab5.3/toolbox/local/loc_plot');
  
%  v=[-6 6 0 .6];
%  axis(v)
%%  bar(x(ii),Nrm,'g')   % plot distrib - bins containing at least 5 values
  h2=bar(x,gaussian(x),'w'); hold on;% plot bar of gaussian curve for comparison
  set(h2,'linestyle','--')
  h1=bar(x,Norm,'g');
  xb=get(h2,'xdata'); yb=get(h2,'ydata');
  plot(xb,yb,'b--')
  plot(xx,gaussx,'r')
  
  ylabel(['PDF of normalized data  (',dataname ')'])
  xlabel(['Number of bins to calculate (chi)^2 = ' num2str(nbin)])

  chi2 = num2str(Xsquare);
  datbar = num2str(mu);
  stdev = num2str(stdd);
  skew = num2str(skewness);
  kurt = num2str(kurtosis);

title(['Chi Sq.=',chi2,',Mean = ',datbar,',Stdev = ',stdev,...   
',Skew = ', skew,',Kurtosis = ',kurt])

%name = input('Type your name so it can be printed on the plot. ','s');
%string = ['number of means = ' num2str(nm) ', mean sample size = '  num2str(nn)];
%axx=axis;
%axis([axx(1:3) axx(4)+0.05]);
%text(axx(1)+.5,axx(4)+.02,string);


signature(name,string,12);


