[Solved] Function curve not rendering correctly

Kristofu0019214 Asks: Function curve not rendering correctly
For some reason, I cannot render the 2-parameter logistic item characteristic curve equation with the given parameters a = 13.67 and b = -1.58.


enter image description here

I use the given code.

Code:
documentclass{report}
usepackage{pgfplots}

begin{document}

begin{figure}[h]
begin{center}
begin{tikzpicture}
begin{axis}[
    enlargelimits=false,
    xlabel={$theta$},
    ylabel={probability},
    xmin=-7, xmax=7,
    ymin=-0.5, ymax=1.5,
    legend pos=north west,
    legend entries={test}
    ]
    addlegendimage{gray}
]

addplot [smooth, gray, domain=-10:10]{exp(13.67*(x+1.58))/(1 + exp(13.67*(x+1.58)))};

end{axis}
end{tikzpicture}
end{center}
end{figure}

end{document}

And this is the output.


enter image description here

However, when I graph the same function on Desmos, it doesn’t look as ugly…


enter image description here

The logistic functions isn’t supposed to be above 1 or below 0. What am I doing wrong so that the output is so off on LaTeX?

Thanks in advance!

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.