1

I am suddenly having a strange issue with circles within an axis environment. Any circles drawn inside an axis become weirdly stretched, as in the following example:

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}

\begin{document}    
    \begin{tikzpicture}
    \begin{axis}[xmin=-5,xmax=5,ymin=-2,ymax=2,axis equal]
    \node[fill=black,inner sep=3pt] (a) at (0,0) {};
    \draw (0,0) circle[radius=1];
    \end{axis}
    \end{tikzpicture}
\end{document}

enter image description here

The issue persists even with the axis equal image option, and, weirdly, it seems that no matter what the bounds on the x-axis are, the drawn path does not "fit" into the coordinate system. On the other hand, the circle command works properly outside of an axis environment. Also, the arc command draws proper circles both in and outside of an axis environment (and with using axis coordinates and units), but I would obviously prefer to use the simpler syntax.

I should mention that I only have a single PC with this issue; my other computer compiles the exact same file properly. They are both running MiKTeX v. 2.9.7300 and have pgfplots v. 1.16.

I cannot say exactly when this issue appeared, but it should be within the last two months or so. It might be related to this question, but I cannot say.

  • I did not read the question carefully enough, sorry. You seem to have found an issue. There is a patch underway, not sure though if it also fixes this issue. –  Feb 12 '20 at 01:27
  • @Schrödinger'scat No problem, thanks for trying to figure it out! – Miha Habič Feb 12 '20 at 01:27
  • If you load \usetikzlibrary{calc} then a temporary workaround is \draw let \p1=($(1,0)-(0,0)$) in (0,0) circle[radius=\x1];. This will draw a circle of radius 1 in axis units. –  Feb 12 '20 at 01:34
  • I have explicitly verified that this issue will get fixed by applying this patch to pgfplots.paths.code.tex. –  Feb 12 '20 at 02:10

0 Answers0