Number of arguments for circle changed in tikz
Brought to you by:
cfeuersaenger,
ludewich
In commit 1302de8 tikz changed the number of arguments for circles. This clashes with pgfplots:
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot (x,x);
\draw[fill=black] (1,1) circle (1pt);
\end{axis}
\end{tikzpicture}
\end{document}
The problem seems to be connected to \pgfplots@path@@tikz@do@circle having two arguments, because with only one argument it seems to work:
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\makeatletter
\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%
\pgfmathparse{#1}%
\let\tikz@ellipse@y=\pgfmathresult%
\ifpgfmathunitsdeclared%
\pgfpathellipse{\pgfpointorigin}{%
\pgfqpoint{\tikz@ellipse@x pt}{0pt}}{\pgfpoint{0pt}{\tikz@ellipse@y pt}}%
\else%
\PackageError{tikz}{You cannot mix dimensions and dimensionless values in an ellipse}{}%
\fi%
\else%
\pgfmathparse{#1}%
\let\tikz@ellipse@y=\pgfmathresult%
\ifpgfmathunitsdeclared%
\PackageError{tikz}{You cannot mix dimensions and dimensionless values in an ellipse}{}%
\else%
\pgfpathellipse{\pgfpointorigin}
{\pgfplotspointaxisdirectionxy{\tikz@ellipse@x}{0}}
{\pgfplotspointaxisdirectionxy{0}{\tikz@ellipse@y}}%
\fi%
\fi%
\endgroup
}
\makeatother
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot (x,x);
\draw[fill=black] (1,1) circle (1pt);
\end{axis}
\end{tikzpicture}
\end{document}
Related Q&As:
Last edit: samcarter 2020-02-11
For the record:
To circumvent this problem use the syntax:
circle [radius=<radius>]. Relevant questions on TeX.SX are:Last edit: Stefan Pinnow 2020-02-14