mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
34 lines
1.1 KiB
TeX
34 lines
1.1 KiB
TeX
\documentclass[varwidth=false, border=2pt]{standalone}
|
|
|
|
\usepackage{pgfplots}
|
|
\pgfplotsset{compat=1.10}
|
|
\usepackage{tikz}
|
|
|
|
\begin{document}
|
|
\begin{tikzpicture}
|
|
\begin{axis}[
|
|
legend pos=north west,
|
|
axis x line=middle,
|
|
axis y line=middle,
|
|
y tick label style={/pgf/number format/fixed,
|
|
/pgf/number format/fixed zerofill,
|
|
/pgf/number format/precision=1},
|
|
grid = major,
|
|
width=16cm,
|
|
height=8cm,
|
|
grid style={dashed, gray!30},
|
|
xmin=-8, % start the diagram at this x-coordinate
|
|
xmax= 8, % end the diagram at this x-coordinate
|
|
ymin= 0, % start the diagram at this y-coordinate
|
|
ymax= 1, % end the diagram at this y-coordinate
|
|
%axis background/.style={fill=white},
|
|
xlabel=$t$,
|
|
ylabel=sig$(t)$,
|
|
tick align=outside,
|
|
enlargelimits=true]
|
|
% plot the stirling-formulae
|
|
\addplot[domain=-8:8, red, ultra thick,samples=500] {1/(1+exp(-1*x))};
|
|
\addlegendentry{sig$(t)=\frac{1}{1+e^{-t}}$}
|
|
\end{axis}
|
|
\end{tikzpicture}
|
|
\end{document}
|