diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.smithchart.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.smithchart.tex | 112 |
1 files changed, 111 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.smithchart.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.smithchart.tex index 40e536b8e0b..7e5a6e61a8e 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.smithchart.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.smithchart.tex @@ -25,13 +25,68 @@ The |\begin{smithchart}| environment draws Smith Charts. It accepts the same \meta{options} as |\begin{axis}|. In fact, it is equivalent to |\begin{axis}[|\meta{options}|,axis type=smithchart]|. \begin{codeexample}[] \begin{tikzpicture} - \begin{smithchart}[title=Default Smith Chart] + \begin{smithchart}[title=Impedance Smith Chart] \addplot coordinates {(0.5,0.2) (1,0.8) (2,2)}; \end{smithchart} \end{tikzpicture} \end{codeexample} The example above visualizes three data points using the initial configuration of Smith Charts; the data points are interpreted as complex numbers $z = x + j y$ and are mapped using $r(z)$. + Here, the $x$ coordinate refers to the cycles described by the horizontal line whereas the $y$ coordinate refers to the cycles described by the tick labels on the outside. + +\begin{pgfplotskey}{smithchart mirrored=\mchoice{true,false} (initially false)} + \PGFPlots\ also supports Admittance Smith Charts. Here, the origin is on the right side of the circle: +\begin{codeexample}[] +\begin{tikzpicture} + \begin{smithchart}[ + smithchart mirrored, + title=Admittance Smith Chart] + \addplot coordinates {(0.5,0.2) (1,0.8) (2,2)}; + \end{smithchart} +\end{tikzpicture} +\end{codeexample} +\end{pgfplotskey} + + + Since \PGFPlots\ can draw two axes on top of each other, a combined Impedance/Admittance Smith Chart is also possible. +\begin{codeexample}[] +\begin{tikzpicture}[] +% First, the Admittance chart: +\begin{smithchart}[ + title=Impedance and Admittance Smith Chart, + smithchart mirrored, + xticklabel shift=-19pt, + grid style={blue}, + ticklabel style={blue}, + yticklabel around circle, +] +\end{smithchart} + +% Second, overlay the impedance chart: +\begin{smithchart}[ + show origin, + grid style={red}, + ticklabel style={red}, + yticklabel around circle*, +] +\addplot+[black,mark=o,only marks,point meta=explicit symbolic,nodes near coords] +coordinates { + (0.2,0.2) [(2)] + (1,0.2) [(1)] + }; + +\addplot+[black,no marks,domain=0.2:1] {0.2}; + +\addplot+[black,mark=o,only marks,point meta=explicit symbolic,nodes near coords] +coordinates{ + (0.2,0.5) [(3)] +}; +\end{smithchart} +\end{tikzpicture} +\end{codeexample} + Since such a chart easily becomes crowded, it should be tuned manually by means of ``suitable'' appearance options (if you feel that there is a ``suitable default'', let me know). + + Details for |show origin|, |yticklabel around circle|, and |yticklabel around circle*| can be found later in this section. \end{environment} \subsubsection{Size Control} @@ -275,6 +330,61 @@ The tick and grid positions for |smithchart| axes are realized by means of three \end{codeexample} \end{stylekey} +\begin{stylekey}{/pgfplots/yticklabel around circle} + This style draws Smith Chart tick labels for imaginary components (the |ytick| arguments) outside of the circle, but rotated to fit the slope of the circle. +\begin{codeexample}[] +\begin{tikzpicture} + \begin{smithchart}[yticklabel around circle] + \end{smithchart} +\end{tikzpicture} +\end{codeexample} + + The initial configuration for this style is +\begin{codeexample}[code only] +\pgfplotsset{ + yticklabel around circle/.style={ + ytick align=center, + yticklabel style={ + rotate=90, + sloped like y axis={% + execute for upside down={\tikzset{anchor=south west}}, + %allow upside down, + reset nontranslations=false}, + anchor=south east, + } + }, +} +\end{codeexample} +\end{stylekey} + +\begin{stylekey}{/pgfplots/yticklabel around circle*} + A variant of |yticklabel around circle| which exchanges the anchors: +\begin{codeexample}[] +\begin{tikzpicture} + \begin{smithchart}[yticklabel around circle*] + \end{smithchart} +\end{tikzpicture} +\end{codeexample} + If you have two Smith Charts in the same figure, you can overlay them if the first uses |yticklabel around circle| and the second uses |yticklabel around circle*| (see the beginning of this section for an example). + + The initial configuration for this style is +\begin{codeexample}[code only] +\pgfplotsset{ + yticklabel around circle*/.style={ + ytick align=center, + yticklabel style={ + rotate=90, + sloped like y axis={% + execute for upside down={\tikzset{anchor=north west}}, + %allow upside down, + reset nontranslations=false}, + anchor=north east, + } + } +} +\end{codeexample} +\end{stylekey} + \begin{stylekey}{/pgfplots/every smithchart axis} This style is installed for every Smith Chart. It is defined as \begin{codeexample}[code only] |