figure-convergence&lr.tex 1.6 KB
Newer Older
曹润柘 committed
1 2 3
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\begin{tikzpicture}
\begin{axis}[
曹润柘 committed
4
  name=s1,  
zengxin committed
5
  width=7cm, height=4.5cm, 
曹润柘 committed
6 7 8 9
  xtick={-4,-3,-2,-1,0,1,2,3,4},
  ytick={0,1,...,4},
  xticklabel style={opacity=0},
  yticklabel style={opacity=0},
曹润柘 committed
10 11
  xlabel={$w$},
  ylabel={$L(w)$},
zengxin committed
12
  axis line style={->,very thick},
曹润柘 committed
13 14 15 16 17 18 19 20 21
  xlabel style={xshift=2.2cm,yshift=1.2cm},
  ylabel style={rotate=-90,xshift=1.5cm,yshift=1.6cm},
  tick align=inside,
  axis y line*=left,
  axis x line*=bottom,
  tick style={opacity=0},
  xmin=-4,
  xmax=4,
  ymin=0,
zengxin committed
22
  ymax=4.5]
曹润柘 committed
23 24 25 26 27 28
\addplot [dashed,ublue,thick] {x^2/4};
\addplot [quiver={u=1,v=x/2,scale arrows = 0.25},domain=-4:-0.3,->,samples=10,red!60,ultra thick] {x^2/4};
\addplot [draw=ublue,fill=red,mark=*] coordinates{(0,0)};
\end{axis}
\begin{axis}[
  at={(s1.south)},
曹润柘 committed
29
  anchor=south, 
曹润柘 committed
30 31
  xshift=6cm,
  yshift=0cm,
zengxin committed
32
  width=7cm, height=4.5cm, 
曹润柘 committed
33 34 35 36
  xtick={-4,-3,-2,-1,0,1,2,3,4},
  ytick={0,1,...,4},
  xticklabel style={opacity=0},
  yticklabel style={opacity=0},
曹润柘 committed
37 38
  xlabel={$w$},
  ylabel={$L(w)$},
zengxin committed
39
  axis line style={->,very thick},
曹润柘 committed
40 41 42 43 44 45 46 47 48
  xlabel style={xshift=2.2cm,yshift=1.2cm},
  ylabel style={rotate=-90,xshift=1.5cm,yshift=1.6cm},
  tick align=inside,
  axis y line*=left,
  axis x line*=bottom,
  tick style={opacity=0},
  xmin=-4,
  xmax=4,
  ymin=0,
zengxin committed
49
  ymax=4.5]
曹润柘 committed
50 51 52 53 54
\addplot [dashed,ublue,thick] {x^2/4};
\addplot [quiver={u=-x-(x/abs(x))*(1+x^2-4)^(1/2),v=-0.7},domain=-4:3.6,->,samples=2,red!60,ultra thick] {x^2/4};
\addplot [quiver={u=-x-(x/abs(x))*(1+x^2-4)^(1/2),v=-0.7},domain=-3.13:2.6,->,samples=2,red!60,ultra thick] {x^2/4};
\addplot [draw=ublue,fill=red,mark=*] coordinates{(0,0)};
\end{axis}
曹润柘 committed
55
\end{tikzpicture}