# Tikz: drawing a straight line down in a rotated scope

I would like to draw a straight line down from (P) to y = -2cm. I tried issuing \draw[rotate = -45, xshift = 0.1cm, >=stealth, |<->|] (P) -- +(0, -1cm); but this doesn't cancel the initial rotation.

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\begin{scope}[rotate = 45]
\draw (-0.5cm, -1cm) rectangle (0.5cm, -2cm) coordinate (P);
\end{scope}
\end{tikzpicture}
\end{document}


Edit:

In my initial workings, I used (0.5cm, -2cm) and not the label (P). The coordinate values produce a different result and resulted in a new question: Tikz: rotating point coordinates over a labelled coordinate

• @GonzaloMedina Paul Gessler pointed that out. I asked a new question because it doesn't work if we use (0.5, 2) instead of P. – dustin May 15 '14 at 17:23

You can do the \draw outside the scope:

## Code:

\documentclass[tikz,border=2pt]{standalone}
\begin{document}
\begin{tikzpicture}
\begin{scope}[rotate = 45]
\draw (-0.5cm, -1cm) rectangle (0.5cm, -2cm) coordinate (P);
\end{scope}
\draw[>=stealth, |<->|] (P) -- +(0, -1cm);
\end{tikzpicture}
\end{document}

• So what I take from this is if I label a point in a scope, that label will be defined by the overall action on it not just its point location, correct? – dustin May 15 '14 at 17:06
• @dustin, this appears to give the exact same result I got using your \draw[rotate = -45, xshift = 0.1cm, >=stealth, |<->|] (P) -- +(0, -1cm); inside the scope. Just for my own knowledge, what is different here? – Paul Gessler May 15 '14 at 17:09
• @PaulGessler you are right. If we don't name the coordinate and just use (0.5cm, -2cm), it doesn't work though. That is why I was under the impression the opposite rotation wouldn't work. – dustin May 15 '14 at 17:12
\documentclass[tikz,border=10pt]{standalone}