TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to rotate a node and then shift it along the X axis. If I do [rotate=90, xshift=-20pt], the node will first shift and then rotate.

share|improve this question
You need to change the order of the transformations. The first transformation applied is the last of the options. – Alain Matthes Dec 26 '11 at 7:52
up vote 7 down vote accepted

You could nest the rotated object inside a shifted scope, i.e.

    \draw [rotate=90] ...;
share|improve this answer

The scope is not necessary. You have two solutions

1) with cm={0,1,-1,0,(-20pt,0cm)}

2) you can try to change the order of your transformations with xshift=-20 pt,rotate=90and not rotate=90,xshift=-20 pt.



 \draw[red,->] (0,0) -- (1,1);   
 \draw[blue,->,cm={0,1,-1,0,(-20pt,0cm)}] (0,0) -- (1,1);

 \draw[red,->] (0,0) -- (1,1);   
 \draw[blue,->,xshift=-20 pt,rotate=90]  (0,0) -- (1,1);
 \draw[green,->,rotate=90,xshift=-20 pt] (0,0) -- (1,1);


enter image description here

share|improve this answer
Ah, didn't know that the order had such an effect. Well, I'll remember that till next time. – gablin Dec 27 '11 at 8:47

Your Answer


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.