summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.smithchart.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.smithchart.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.smithchart.code.tex165
1 files changed, 36 insertions, 129 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.smithchart.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.smithchart.code.tex
index 7d24c53216d..e1561bb96ac 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.smithchart.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.smithchart.code.tex
@@ -213,6 +213,30 @@
%font=\tiny,
}
},
+ 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,
+ %font=\tiny,
+ }
+ },
+ 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,
+ %font=\tiny,
+ }
+ }
}
\def\pgfplots@smithchartaxis@activate{%
@@ -259,7 +283,7 @@
\fi
}%
\def\axisdefaultheight{\axisdefaultwidth}%
- \let\pgfplots@initsizes=\pgfplots@initsizes@smithchart
+ \let\pgfplots@BB@for@plotbox@get@unit@scales@for@limits=\pgfplots@BB@for@plotbox@get@unit@scales@for@limits@smithchart
%\let\pgfplots@limits@ready=\pgfplots@limits@ready@smithchart
%\let\pgfplots@show@ticklabel@=\pgfplots@show@ticklabel@@smithchart
%\def\pgfplots@xtick@disable@last@tick{0}%
@@ -1513,134 +1537,17 @@
\fi
}%
-\def\pgfplots@initsizes@smithchart{%
- % I copy-pasted most of this code, up to just one position where
- % I introduced the modified scaling for smithchart axes
- %----------------------------------
- % INIT.
- %
- %
- \def\pgfplots@minmax@reg@forbidden{\pgfplots@error{Sorry, an internal logic error occured during smithchart processing (a routine tried to access \string\pgfplots@xmin@reg\space or its variants). Please report this as bug, sorry}}%
- \iffalse
- \pgfplots@xmin@reg=\pgfplots@xmin pt %
- \pgfplots@xmax@reg=\pgfplots@xmax pt %
- \pgfplots@ymin@reg=\pgfplots@ymin pt %
- \pgfplots@ymax@reg=\pgfplots@ymax pt %
- \ifpgfplots@threedim
- \pgfplots@zmin@reg=\pgfplots@zmin pt %
- \pgfplots@zmax@reg=\pgfplots@zmax pt %
- \fi
- \else
- \let\pgfplots@xmin@reg=\pgfplots@minmax@reg@forbidden
- \let\pgfplots@xmax@reg=\pgfplots@minmax@reg@forbidden
- \let\pgfplots@ymin@reg=\pgfplots@minmax@reg@forbidden
- \let\pgfplots@ymax@reg=\pgfplots@minmax@reg@forbidden
- \let\pgfplots@zmin@reg=\pgfplots@minmax@reg@forbidden
- \let\pgfplots@zmax@reg=\pgfplots@minmax@reg@forbidden
- \fi
- %
- %
- %-----------------------------------------
- % PROCESS THE 'width' and 'height' options
- %-----------------------------------------
- %
- %
- \pgfkeysgetvalue{/pgfplots/view/az}{\pgfplots@view@az}%
- \pgfkeysgetvalue{/pgfplots/view/el}{\pgfplots@view@el}%
- \ifpgfplots@threedim
- \def\pgfplots@tmpZscale{1pt}%
- \else
- \def\pgfplots@tmpZscale{0pt}%
- \let\pgfplots@view@el=\pgfutil@empty
- \let\pgfplots@view@az=\pgfutil@empty
- \fi
- \ifx\pgfplots@view@az\pgfutil@empty
- %\let\pgfplots@rectangle@width=\pgfutil@empty
- %\let\pgfplots@rectangle@height=\pgfutil@empty
- \def\pgfplots@view@dir@threedim@x{0}%
- \def\pgfplots@view@dir@threedim@y{0}%
- \def\pgfplots@view@dir@threedim@z{1}%
- %
- % FIXME HERE COMES THE smithchart MODIFICATION
- %--------------------------------------------------
- % \pgfpointdiff
- % {\pgfplotsqpointxy{\pgfplots@xmin}{\pgfplots@ymin}}
- % {\pgfplotsqpointxy{\pgfplots@xmax}{\pgfplots@ymax}}%
- %--------------------------------------------------
- % instead of scaling from (min) (max), we only need the UPPER
- % bound -- in both, x and y directions (since we have a cycle.
- % Furthermore, we need it twice since we are interested in the
- % diameter, not the radius.
- \global\pgf@x=2 pt % radius
- \global\pgf@y=\pgf@x % same for y
- %
- % only used temporarily in this macro to compute the correct
- % length for unit vectors:
- \edef\pgfplots@initsizes@axisdiag@x{\the\pgf@x}%
- \edef\pgfplots@initsizes@axisdiag@y{\the\pgf@y}%
- %
- \ifx\pgfplots@x\pgfutil@empty
- \ifx\pgfplots@width\pgfutil@empty
- \pgfplots@error{INTERNAL LOGIC ERROR! WIDTH NOT SET}%
- \fi
- \pgfplots@initsizes@getXscale\pgfplots@initsizes@axisdiag@x\into\pgfplots@tmpXscale
- %\ifpgfplots@scale@only@axis
- % \let\pgfplots@rectangle@width=\pgfplots@width
- %\fi
- \else
- \def\pgfplots@tmpXscale{1}%
- \fi
- %
- \ifx\pgfplots@y\pgfutil@empty
- \ifx\pgfplots@height\pgfutil@empty
- \pgfplots@error{INTERNAL LOGIC ERROR! HEIGHT NOT SET}%
- \fi
- \pgfplots@initsizes@getYscale\pgfplots@initsizes@axisdiag@y\into\pgfplots@tmpYscale
- %\ifpgfplots@scale@only@axis
- % \let\pgfplots@rectangle@height=\pgfplots@height
- %\fi
- \else
- \def\pgfplots@tmpYscale{1}%
- \fi
- %
- \edef\pgfplots@tmpXscale{\pgfplots@tmpXscale pt}%
- \edef\pgfplots@tmpYscale{\pgfplots@tmpYscale pt}%
- %
- \pgfplots@initsizes@setunitvector{x}{0}{\pgfplots@tmpXscale}{\pgfplots@tmp@xisaxisparallel}%
- \pgfplots@initsizes@setunitvector{y}{1}{\pgfplots@tmpYscale}{\pgfplots@tmp@yisaxisparallel}%
- \pgfplots@initsizes@setunitvector{z}{2}{\pgfplots@tmpZscale}{\pgfplots@loc@TMPc}%
- \else
- % 3D case is currently always initialised by `view':
- \let\pgfplots@x=\pgfutil@empty
- \let\pgfplots@y=\pgfutil@empty
- \let\pgfplots@z=\pgfutil@empty
- \pgfplotssetaxesfromazel{\pgfplots@view@az}{\pgfplots@view@el}{\pgfplots@tmp@xisaxisparallel}%
- \if1\pgfplots@tmp@xisaxisparallel%
- \def\pgfplots@tmp@yisaxisparallel{1}%
- \fi
- \fi
-%\message{Pgfplots debug: initialised unit vectors to x=(\the\pgf@xx,\the\pgf@xy), y=(\the\pgf@yx,\the\pgf@yy), z=(\the\pgf@zx,\the\pgf@zy). }%
- %
- \let\pgfplotsmathfloatviewdepthxyz@=\pgfplotsmathfloatviewdepthxyz@infigure
- \let\pgfplotsmathviewdepthxyz@=\pgfplotsmathviewdepthxyz@infigure
- %
- \pgfplotsmath@ifzero{\pgfplots@x@veclength}{\pgfplots@hide@xtrue\pgfplots@shownothingof@xtrue}{}%
- \pgfplotsmath@ifzero{\pgfplots@y@veclength}{\pgfplots@hide@ytrue\pgfplots@shownothingof@ytrue}{}%
- \ifpgfplots@threedim
- \pgfplotsmath@ifzero{\pgfplots@z@veclength}{\pgfplots@hide@ztrue\pgfplots@shownothingof@ztrue}{}%
- \else
- \if1\pgfplots@tmp@xisaxisparallel%
- \if1\pgfplots@tmp@yisaxisparallel%
- % Optimize for axis-parallel case!
- % puh. Did not make any measureable difference!? Ok...
- \let\pgfplotsqpointxy=\pgfplotsqpointxy@orthogonal
- \fi
- \fi
- \fi
- %
- % FIXME : unit vector ratio / axis equal
- %
-}
+\def\pgfplots@BB@for@plotbox@get@unit@scales@for@limits@smithchart#1#2#3{%
+ % In a smith chart, the size of the image is unrelated to the
+ % involved data limits.
+ %
+ % The factor 2 is because we want to fit the DIAMETER into the
+ % prescribed dimensions, not just the radius.
+ \def\pgfmathresult{2}%
+ \let#1=\pgfmathresult
+ \let#2=\pgfmathresult
+ \def#3{1}%
+}%
\def\pgfplots@handle@invalid@range@defaultlimits@smithchart{%
\pgfplotscoordmath{x}{parsenumber}{0}%