sigmoid-function-2.tex 965 B

1234567891011121314151617181920212223242526272829303132
  1. \documentclass[varwidth=false, border=2pt]{standalone}
  2. \usepackage{pgfplots}
  3. \pgfplotsset{compat=1.10}
  4. \usepackage{tikz}
  5. \begin{document}
  6. \begin{tikzpicture}
  7. \begin{axis}[
  8. legend pos=north west,
  9. axis x line=middle,
  10. axis y line=middle,
  11. grid = major,
  12. width=16cm,
  13. height=8cm,
  14. grid style={dashed, gray!30},
  15. xmin=-8, % start the diagram at this x-coordinate
  16. xmax= 8, % end the diagram at this x-coordinate
  17. ymin= 0, % start the diagram at this y-coordinate
  18. ymax= 1, % end the diagram at this y-coordinate
  19. %axis background/.style={fill=white},
  20. xlabel=$t$,
  21. ylabel=sig$(t)$,
  22. tick align=outside,
  23. enlargelimits=true]
  24. % plot the stirling-formulae
  25. \addplot[domain=-8:8, red, ultra thick,samples=500] {1/(1+exp(-1*x))};
  26. \addlegendentry{sig$(t)=\frac{1}{1+e^{-t}}$}
  27. \end{axis}
  28. \end{tikzpicture}
  29. \end{document}