5

In TikZ manual page 1002/1318, there is an example to create a circular array like this:

enter image description here

The problem is the author called the radius of each circle as the diameter. Below is the code:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture} Let's draw circles at interesting points: \foreach \x / \y / \diameter in {0 / 0 / 2mm, 1 / 1 / 3mm, 2 / 0 / 1mm} \draw (\x,\y) circle (\diameter); % Same effect \foreach \center/\diameter in {{(0,0)/2mm}, {(1,1)/3mm}, {(2,0)/1mm}} \draw[yshift=2.5cm] \center circle (\diameter);; \draw[red] [|-|] (0,0) -- ++(0,2mm);% I added this to measure the radius \end{tikzpicture} \end{document}

Am I right?

Aria
  • 1,523
  • 9
    +1 That's right, report it in the bug tracker here pgf-issues – AndréC Aug 01 '20 at 20:41
  • 9
    The question is a bug report and should be addressed elsewhere – egreg Aug 01 '20 at 20:51
  • 5
    Rather than being a bug report I'd say that the OP is asking for clarification that this is indeed a bug, which seems perfectly reasonable to me. –  Aug 02 '20 at 03:39
  • Moreover, for what I know (see manual 14.6 The Circle and Ellipse Operations, or https://tex.stackexchange.com/questions/525870/drawing-circles-within-an-axis-of-pgfplots) the syntax circle(radius) is deprecated, you should use circle[radius=...]. I imagine the manual is being updated, but it is so big that it's not easy to percolate changes – Rmano Aug 02 '20 at 10:17
  • I've added a commit which replaces \diameter with \r, to pull request https://github.com/pgf-tikz/pgf/pull/905. The old syntax of ... circle (<radius>) is not modified since it is documented in last two paragraphs of doc of circle operator, sec. 14.6 of pgfmanual 3.1.5b. PS: you can click any occurrences of operator circle in code examples of pgfmanual to jump to sec. 14.6. – muzimuzhi Z Aug 02 '20 at 15:03

0 Answers0