Debian Codegraph @

texmf-dist/doc/latex/numericplots/src/examples/NyquistPlot.tex

raw
1
2 \newlength{\GRheight}
3 \newlength{\GRwidth}
4
5 % desired width of the graphic
6 \setlength{\GRwidth}{0.5\textwidth}
7 % calculate height:
8 % first intermediate step
9 % axis width: GRwidth - (llx+urx)
10 \setlength{\GRheight}%
11 {\GRwidth-7ex-\baselineskip-2pt-2ex}
12 % sec. intermediate step
13 % scale with data range ration
14 % factor 0.7692 = (yMax-yMin)/(xMax-xMin)
15 \setlength{\GRheight}{0.7692\GRheight}
16 % third intermediate step
17 % add padding values to axis height to obtain total height.
18 \begin{NumericDataPlot}%
19 {\GRwidth}{\GRheight+2\baselineskip+1ex+2pt+0.5em}
20
21 \setxAxis{xMin=-1.1, xMax=1.5, Dx=0.5, xO=0}
22 \setyAxis{yMin=-1, yMax=1, Dy=0.5, yO=0}
23
24 \plotxAxis{$Real\left(G\left(I\omega\right)\right)$}
25 \plotyAxis{$Imag\left(G\left(I\omega\right)\right)$}
26
27 \listplot[style=StdLineStyA]{\DataNyquistNeg}
28 \listplot[style=StdLineStyA]{\DataNyquistPos}
29
30 % Pfeile
31 \listplot%
32 [style=StdLineStyA, arrows=->, linestyle=none]{\DataNyquistArrowPos}
33 \listplot%
34 [style=StdLineStyA, arrows=<-, linestyle=none]{\DataNyquistArrowNeg}
35
36 % Beschriftung
37 % 1.00000 -0.00000
38 % 0.80000 0.40000
39 % 0.00000 0.00000
40 \NDPput[x=1.0, y=0.0]{\pnode{Pa1}}
41 \NDPput[x=0.8, y=-0.4]{\pnode{Pa2}}
42 \NDPput[x=0.0, y=0.0]{\pnode{Pa3}}
43 \NDPput[x=1.1, y=0.1, RefPoint=l]%
44 {\Rnode{Pb1}{
45 \psframebox[fillstyle=solid,fillcolor=white,linestyle=none]{%
46 $\omega=0$}}}
47 \ncline{-}{Pb1}{Pa1}
48 \NDPput[x=0.9, y=-0.6, RefPoint=l]%
49 {\Rnode{Pb2}{
50 \psframebox[fillstyle=solid,fillcolor=white,linestyle=none]{%
51 $\omega=0.5$}}}
52 \ncline{-}{Pb2}{Pa2}
53 \NDPput[x=-0.1, y=-0.15, RefPoint=r]%
54 {\Rnode{Pb3}{
55 \psframebox[fillstyle=solid,fillcolor=white,linestyle=none]{%
56 $\omega=\infty$}}}
57 \ncline{-}{Pb3}{Pa3}
58 \NDPput[x=-0.1, y=0.15, RefPoint=r]%
59 {\Rnode{Pc3}{
60 \psframebox[fillstyle=solid,fillcolor=white,linestyle=none]{%
61 $\omega=-\infty$}}}
62 \ncline{-}{Pc3}{Pa3}
63
64 % Pfeil
65 \ncline{->}{Pa3}{Pa2}
66
67 % Marker
68 \listplot[style=StdLineStyC, plotstyle=dots]{\DataNyquistMarkPos}
69 \listplot[style=StdLineStyC, plotstyle=dots, dotstyle=x, dotsize=10pt]{-1 0}
70
71 \end{NumericDataPlot}
72
73 %%% Local Variables:
74 %%% mode: latex
75 %%% TeX-master: "../NumericPlotsDoc"
76 %%% End: