Can someone explain me why the function binom (in red) does not work for x=-6 and x=+6 (compare with the correct plot (in gray)) ?
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}
\begin{document}
\begin{tikzpicture}
[declare function={binom(\N,\m)=\N! / (2^\N) / ((\N+\m)/2)! / ((\N-\m)/2)!;}]
\begin{axis}[ ymin=0,
ymax=0.4,
xmin=-6.5,
xmax=6.6,
axis lines=left,
x label style={at={(axis description cs:1,0.1)},anchor=north},
y label style={at={(axis description cs:-0.15,1)},rotate = -90, anchor=north},
samples at={-6,-4,...,6},
xtick={-6,-5,...,6},
yticklabel style={
/pgf/number format/fixed,
/pgf/number format/fixed zerofill,
/pgf/number format/precision=2},
ybar=0pt,
bar width=1,
bar shift=0pt]
\addplot [fill=red!25] {binom(6,x)};
\addplot [fill=gray!25,bar width=.5] plot coordinates {(-6,1/2^6)
(-4,{6!/2^6/5!/1!})
(-2,{6!/2^6/4!/2!})
(0,{6!/2^6/3!/3!})
(2,{6!/2^6/4!/2!})
(4,{6!/2^6/5!/1!})
(6,{6!/2^6/6!/0!})};
\end{axis}
\end{tikzpicture}
\end{document}

