6

To my understanding of the documentation, the scope block should transform all coordinates. However, in the following example, only circles themselves are scaled, but not their centers: black circles are without yscale, red ones are with yscale=.5, and are centered at the same points (a), (b):

rendering of the pdf

What is the problem? Am I misunderstanding the docs?

\documentclass{minimal}
\usepackage{tikz}
\begin{document}
    \tikz{
        \coordinate (a) at (0,0);
        \coordinate (b) at (0,1);
        \draw (a) circle (.5);
        \draw (b) circle (.5);
        \begin{scope}[red,yscale=.5]
            \draw (a) circle (.5);
            \draw (b) circle (.5);
        \end{scope}
    }
\end{document}
eudoxos
  • 2,973

2 Answers2

5

As Altermundus has already commented, the nodes are defined before the scope. When you are saying (a) it references an actual node, that has a position. Therefore the transformation matrix is not applied to it, that would basically mean the node would have to be moved. The transformation matrix is applied to newly created coordinates. If you were to create the nodes inside of the scope and then refer to them outside of the scope, they would not be moved either.

Roelof Spijker
  • 17,663
  • 5
  • 55
  • 63
3

You can add the transformation in the node reference to change node coordinates:

\draw ([yscale=.5] a) circle (.5);