multivariate-statistics/figures/plots/logistic_curve.tex

23 lines
530 B
TeX
Executable File

\documentclass[margin=0.5cm]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
title={Logit function},
xlabel={$x$},
ylabel={$y$},
domain=-5:5,
samples=200,
legend style={at={(0.95,0.05)},anchor=south east}
]
\newcommand{\Lvar}{1}
\newcommand{\kvar}{1}
\newcommand{\xvar}{0}
\addplot [blue] {\Lvar / (1 + exp(-\kvar*(x-\xvar)))};
\addlegendentry{$L = \Lvar, k=\kvar, x_0=\xvar$};
\end{axis}
\end{tikzpicture}
\end{document}