I want to draw a sigmoidal graph like the one in the link below:
Could you please help me?
I want to draw a sigmoidal graph like the one in the link below:
Could you please help me?
Just to give you an idea.
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[domain=-2:2,
xlabel=$x$,
ylabel={$\pi^0$},
ytick={},yticklabels={},
xtick={-1,0,1,2,3},xticklabels={1,2,3,4,5}
]
\addplot[mark=none,thick] ({tanh(\x)},{\x});
\addplot[mark=none] ({sign(\x)*pow(abs(tanh(\x)),2/3)},{\x});
\addplot[mark=none,dashed] ({sign(\x)*pow(abs(tanh(\x)),1/3)},{\x});
\addplot[mark=none,domain=0.965:3,samples=60,thick] ({\x},{pow(\x-0.965,1/4)+2});
\end{axis}
\end{tikzpicture}
\end{document}
BTW, I don't think this is a sigmoidal plot, but as you can see you can plot tanh functions here.
pgfplots. See https://tex.stackexchange.com/questions/3622/best-way-to-generate-a-nice-function-plots-in-latex for a code example. – Torbjørn T. Feb 02 '18 at 00:03