Follow-up question to Plotting bell shaped curve in TikZ-PGF
I'm new to LaTeX, and I'm typesetting a document for my stats class, and trying to use LaTeX to produce a normal probability distribution. I modified the code shown in Jake's answer to the question I referenced here, and got the following:
\documentclass{article}
\usepackage{pgfplots}
\pgfmathdeclarefunction{gauss}{2}{% normal distribution where #1 = mu and #2 = sigma
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
no markers, domain=2.1:2.3, samples=100,
axis lines*=left,
height=5cm, width=12cm,
xtick={2.12, 2.14, 2.16, 2.18, 2.2, 2.22, 2.24, 2.26, 2.28}, ytick={0.5, 1.0},
enlargelimits=false, clip=false, axis on top,
]
\addplot{gauss(2.2,0.0179)};
\end{axis}
\end{tikzpicture}
\end{document}
The problem is that when I compile, the y-axis values are nowhere near where they should be:
How do I fix that?
I'm wondering if it's a system problem, because the output shown in Jake's answer on Bell Curve/Gaussian Function/Normal Distribution in TikZ/PGF has appropriate y-axis values and I don't see why it should be any different.