Because chi2gof returns bin edges, need to convert to centers --
x=filter([0.5 0.5],1,st.edges); x=x(2:end); % average successive edges for centers
bar(x,[st.O;st.E]','grouped') % put the two groups together for bar
legend('Observed','Expected') % tell who's who...