I have a valid gnuplot
function (plots fine in gnuplot
), with pgfplots
fails to use:
\documentclass{article}
\usepackage{graphicx}
\usepackage{pgfplots}
\begin{document}
\begin{figure}[H]
\pgfplotsset{width=0.8\textwidth, height=0.6\textwidth}
\pgfplotsset{samples=200}
\centering
\begin{tikzpicture}
\begin{axis}[mark=none, style=solid,
enlargelimits=false,
xmin=0,xmax = 2.5,
ymin=0,ymax = 2.5]
%
\addplot gnuplot{3*(x**(3-1))*exp(-x**3)};
%
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
The error is
PGFPlots: reading {testplots.pgf-plot.table}
! Package pgfplots Warning: Axis range for axis y is approximately empty; enlarging it (it is [0.0:0.0])
! Package PGF Math Error: You've asked me to divide `231.00105000000000' by `0.0', but I cannot divide any number by `0.0'.
domain=0:2.5
it works without any errors.-5:5
and the value of the function at -5 is more than 10^56. I guess this has something to do with the weird error.