%%%------------------------------------------------------------------------------------------------------------
\begin{tikzpicture}
\begin{axis}[  
  name=tanh,
  width=6cm, height=4.5cm, 
  xtick={-5,-2.5,...,6},
  ytick={-1.0,-0.5,0,0.5,1.0},
  xlabel={$x$},
  ylabel={$y$},
  xlabel style={xshift=2.4cm,yshift=2.5cm},
  axis y line=middle,%y轴居中
  ylabel style={xshift=0.1cm,yshift=0cm},
  x axis line style={->},%x轴箭头
  axis line style={very thick},
  axis x line*=middle,%将上面的x轴去掉，仅保留下面的x轴
  xmin=-6,
  xmax=6,
  ymin=-1.2,
  ymax=1.2]
\addplot[draw=red,very thick]{tanh(x)};
\end{axis}
\node [anchor=north] (labelc) at (2.3,-0.5) {\footnotesize{(a)}};
\begin{axis}[  
  at={(tanh.east)},
  anchor=east, 
  xshift=6cm,
  yshift=0cm, 
  width=6cm, height=4.5cm, 
  xtick={-10,-5,...,10},
  ytick={0,0.5,1},
  xlabel={$x$},
  ylabel={$y$},
  xlabel style={xshift=2.4cm,yshift=0.7cm},
  axis y line=middle,%y轴居中
  ylabel style={xshift=0.1cm,yshift=0cm},
  x axis line style={->},%x轴箭头
  axis line style={very thick},
  axis x line*=bottom,%将上面的x轴去掉，仅保留下面的x轴
  xmin=-10,
  xmax=10,
  ymin=0,
  ymax=1.2]
\addplot[draw=ublue,very thick]{1-tanh(x)*tanh(x)};
\end{axis}
\node [anchor=north] (labelc) at (8.2,-0.5) {\footnotesize{(b)}};
\end{tikzpicture}
%%%------------------------------------------------------------------------------------------------------------

