diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/pgfplots.paths.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/pgfplots.paths.code.tex | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.paths.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.paths.code.tex index 077a3a2b95d..7ea1bceee73 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.paths.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.paths.code.tex @@ -30,17 +30,39 @@ \def\pgfplots@install@path@replacements{% \ifpgfplots@path@replace@ellipse \let\tikz@do@circle=\pgfplots@path@@tikz@do@circle + \let\tikz@do@ellipse=\pgfplots@path@@tikz@do@ellipse \expandafter\def\expandafter\pgfinterruptpicture\expandafter{\pgfinterruptpicture \let\tikz@do@circle=\pgfplots@path@@tikz@do@circle@orig + \let\tikz@do@ellipse=\pgfplots@path@@tikz@do@ellipse@orig }% \fi }% \let\pgfplots@path@@tikz@do@circle@orig=\tikz@do@circle +\let\pgfplots@path@@tikz@do@ellipse@orig=\tikz@do@ellipse % This is a replacement for \tikz@do@circle which replaces the "xy" % coordinate system by one which is compatible with pgfplots. -\def\pgfplots@path@@tikz@do@circle#1#2{% +\def\pgfplots@path@@tikz@do@circle#1{% + \begingroup + \ifpgfplots@usefpu + \pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}% + \fi + \pgfmathparse{#1}% + \let\tikz@ellipse@x=\pgfmathresult% + \ifpgfmathunitsdeclared + \pgfpathellipse{\pgfpointorigin}% + {\pgfqpoint{\tikz@ellipse@x pt}{0pt}}% + {\pgfpoint{0pt}{\tikz@ellipse@x pt}}% + \else + \pgfpathellipse{\pgfpointorigin}% + {\pgfplotspointaxisdirectionxy{\tikz@ellipse@x}{0}}% + {\pgfplotspointaxisdirectionxy{0}{\tikz@ellipse@x}}% + \fi + \endgroup +} + +\def\pgfplots@path@@tikz@do@ellipse#1#2{% \begingroup \ifpgfplots@usefpu \pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}% @@ -69,3 +91,12 @@ \fi% \endgroup } + +% Older versions of TikZ did not define \tikz@do@ellipse but only +% \tikz@do@circle which took the place of \tikz@do@ellipse, i.e. the same code +% was used for both paths. In that case, we override the new circle code with +% the ellipse code to retain the behaviour of using the same code on both +% paths. +\ifdefined\tikz@do@ellipse\else + \let\pgfplots@path@@tikz@do@circle=\pgfplots@path@@tikz@do@ellipse +\fi |