I'm trying to plot a Gauss function/normal distribution, based on the answer to this question, however my domain is 0:10000 and the sample size is 95. This is resulting on the following error:
Dimension too large.
\pgfmathfloatexp@@ ...}\pgf@xa =\pgfmathresult pt
\pgf@xa =0.434294481\pgf@x...
l.27 \addplot {gauss(4,0.5)};
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
I tried the answer to this question, but it didn't solve the problem.
Here's a MWE:
\documentclass[a4paper]{abntex2}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{siunitx}
\begin{document}
\pgfmathdeclarefunction{gauss}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}
\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[every axis plot post/.append style={
mark=none,domain=0:1000,samples=95,smooth}, % All plots: from -2:2, 50 samples, smooth, no marks
axis x line*=bottom, % no box around the plot, only x and y axis
axis y line*=left, % the * suppresses the arrow tips
enlargelimits=upper,
restrict y to domain=0:10
] % extend the axes a bit to the right and top
\addplot {gauss(9043.1578947369,1)};
\end{axis}
\end{tikzpicture}
\caption{Tempos de deliberação por partida} \label{montecarlodist1}
\end{figure}
\end{document}
