4

I've drawn a circuit path using CircuiTikZ library. Now I want to rotate the circuit as a whole. The nodes of circuit are transform correctly. However the circuit elements do not get rotated at all.

By using a scope environment with the rotate parameter

\begin{scope}[rotate=30]
    \draw (0,2) to[L] (4,2)
        to[short] (4,-2)
        to[C] (0,-2)
        to[short] (0,2);
\end{scope}

I end up with this:

Failed rotation of CircuiTikZ path.

If it matters, I'm drawing this inside a tikzpicture environment.

1
  • 1
    Oh, and welcome to TeX.SX! Commented Mar 20, 2014 at 10:03

1 Answer 1

9

The circuit elements are probably defined as nodes, and node shapes are by default not influenced by rotate. To enable rotating for those as well, add transform shape to the scope settings:

enter image description here

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{circuitikz}
\begin{document}
\begin{tikzpicture}
\begin{scope}[rotate=30,transform shape]
    \draw (0,2) to[L] (4,2)
        to[short] (4,-2)
        to[C] (0,-2)
        to[short] (0,2);
\end{scope}
\end{tikzpicture}
\end{document}
1
  • 1
    Despite avoiding 'thanks' comments: Thank you, for the fast and correct answer.
    – Yasumi
    Commented Mar 20, 2014 at 12:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .