I'm having trouble using tikz's
\draw (coordinate) circle (radius);
Command within the axis environment of pgfplots. The following code fails to compile:
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot {x};
\draw (1,1) circle (1cm);
\end{axis}
\end{tikzpicture}
\end{document}
But if I try to draw a circle outside the axis environment it works (although of course the coordinates are not relative to the axis that is drawn). Any idea as to what is happening? I've tried setting compat=1.15 but I get a similar error.
\draw (1,1) circle[radius=1cm];. – Jan 27 '20 at 16:11