2

I am aiming to plot a quadratic function and a s-curve as drawn here however I have not been able to get the lines to match up. Please assist if you could!

enter image description here

\begin{tikzpicture}
\begin{axis}[grid=both,
          xmax=10,ymax=10]
\addplot[green]  {x^2};
\addplot[blue,domain=1/2^6:10,samples=100]  {1/(1 + exp(-x))};
\end{axis}
\end{tikzpicture}
  • what are the functions – percusse Apr 12 '18 at 10:28
  • Please provide the code you are using now, a MWE – arauzo Apr 12 '18 at 10:47
  • @Oscar you also can take a look here: tex.stackexchange.com/q/426208/120578 because this post made me to write that question-answer (It will possibly help you to your other question too) – koleygr Apr 12 '18 at 15:43
3

Perhaps something like this?

\documentclass[border = 5pt]{standalone}

\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
\begin{axis}[grid=both,
          domain=0:2,
          samples=100,
          ]
          \addplot[green]  {(x / 2)^2};
          \addplot[blue,]  {1/(1 + exp(-4 * (x - 1)))};
\end{axis}
\end{tikzpicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.