Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
3  
It's normal : (a) and (b) are defined before the scope –  Alain Matthes Dec 16 '11 at 15:21
add comment

2 Answers

up vote 4 down vote accepted

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.

share|improve this answer
add comment

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

\draw ([yscale=.5] a) circle (.5);
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.