I have a figure, created in MS Visio, a PDF figure. I have added text to the figure using qtix
. The code is pasted below:
\begin{tikzpicture}[scale=0.30]
\pgftext{\includegraphics{TransformerSubstationFeeding}}
\small
\node at (8,-0.5) {Ground};
\node at (-0.5,-0.5) {Ground};
\node at (-9,-0.5) {Ground};
\node at (14.5,9.1) {Public grid; phase A};
\node at (14.5,8.3) {phase A};
\node at (14.5,7.5) {phase B};
\node at (14.5,6.7) {phase C};
\node at (14.5,2.3) {Railway grid};
\node at (14.5,1.5) {catenary};
\node at (14.5,0.7) {rail/ground};
\node at (11.5,3.8) {Transformer};
\node at (3.0,3.8) {Transformer};
\node at (-5.5,3.8) {Transformer};
\end{tikzpicture}
The figure is more landscape-shaped, so I want to rotate the figure in my document. The figure is attached below.
The problem is I dot now know how to rotate figures that are inserted by the \input
command. The \includegraphics
command can use rotation, but then each text also need to be rotated. And when doing that, the centering of the image fails. I have tried that too. See the code below:
\begin{tikzpicture}[rotate=90,scale=0.32]
\pgftext{\includegraphics{TransformerSubstationFeeding}}
\small
\node[rotate=90] at (8,-0.5) {Ground};
\node[rotate=90] at (-0.5,-0.5) {Ground};
\node[rotate=90] at (-9,-0.5) {Ground};
\node[rotate=90] at (14.5,9.1) {Public grid; phase A};
\node[rotate=90] at (14.5,8.3) {phase A};
\node[rotate=90] at (14.5,7.5) {phase B};
\node[rotate=90] at (14.5,6.7) {phase C};
\node[rotate=90] at (14.5,2.3) {Railway grid};
\node[rotate=90] at (14.5,1.5) {catenary};
\node[rotate=90] at (14.5,0.7) {rail/ground};
\node[rotate=90] at (11.5,3.8) {Transformer};
\node[rotate=90] at (3.0,3.8) {Transformer};
\node[rotate=90] at (-5.5,3.8) {Transformer};
\end{tikzpicture}
The main document part of my code looks like:
\begin{figure}
\centering
\input{Visioritning2.pgf}
\caption{A simplified illustration of how the three-phase grid commonly feeds the railway when using substation transformers}
\label{Figure:SimplifiedTransformerSubstation}
\end{figure}
So any suggestions of what I should do? The main problem is:
- How to both rotate and center a PGF-created PDF-based figure with added explanatory text on it?
- Is it preferable to to the rotation in PGF-code or is it better to do it in the, or before the
\input
statement?
{}
button). I've also inserted your image, and removed the closing, to keep with the format of this site. – Jake Mar 29 '12 at 15:46\rotatebox{<angle>}{<content>}
from thegraphicx
package (already loaded bytikz
).\centering
should center it, at least relative to its official size. Try to avoid having whitespace around your real content. You should crop the PDF first usingpdfcrop
for example. – Martin Scharrer♦ Mar 29 '12 at 15:55standalone
. The v1.0 version provides\includestandalone[<options, incl. angle>]{<code file, like your .pgf>}
. – Martin Scharrer♦ Mar 29 '12 at 15:56