9

When scaling a circuit with the scale option:
\begin{circuitikz}[scale = 'some_scale_factor']
all the coordinates are well scaled but not the components.

How to correctly scale the whole scheme?

5
  • It could be done with the "transform shape" option. =)
    – Leonardo
    Sep 23, 2011 at 11:54
  • Or wrap the whole thing in a \scalebox{<factor>}{..} (graphicx package) or \begin{adjustbox}{scale=<factor>} .. \end{adjustbox} (adjustbox pacakge). There should be a similar question about TikZ itself around. Sep 23, 2011 at 11:56
  • Related question (as @MartinScharrer hinted): How to scale Tikz drawings and text together?
    – diabonas
    Sep 23, 2011 at 13:28
  • @Martin: this will affect the font size. Is there a way to scale everything but the font?
    – pluton
    Sep 23, 2011 at 13:34
  • @pluton: I don't know if there's a way to do not scale the font, but you can rescale it with \scalefont: {\scalefont{scale_factor} text_or_tikz_code}
    – Leonardo
    Sep 23, 2011 at 14:04

3 Answers 3

18

Just to summarize:

My answer:

It could be done with the "transform shape" option: \begin{circuitikz}[scale = 'some_scale_factor', transform shape]

Martin's answer:

Wrap the whole thing in a \scalebox{<factor>}{..} (graphicx package) or \begin{adjustbox}{scale=<factor>} .. \end{adjustbox} (adjustbox pacakge).

3

If you want to scale only the components but not the text, you can use /tikz/circuitikz/bipoles/length (taken from Scaling components in CircuiTikz):

\documentclass[border=5pt,varwidth]{standalone}
\usepackage{tikz}
\usepackage{circuitikz}
\usepackage{siunitx}

\begin{document}
\begin{circuitikz}
\draw (0,0)
    to [sV=$a_1$] (2,0)
    to [C=$\SI{100}{\ohm}$](3,0)
    to [sV=$a_2$] (5,0)
    to [sV=$a_1$] (7,0);
\end{circuitikz}

\vspace{1cm}

\begin{circuitikz}[/tikz/circuitikz/bipoles/length=1cm]
\draw (0,0)
    to [sV=$a_1$] (2,0)
    to [C=$\SI{100}{\ohm}$](3,0)
    to [sV=$a_2$] (5,0)
    to [sV=$a_1$] (7,0);
\end{circuitikz}
\end{document}

example

Note that you can combine this with scale, xscale, or yscale to scale the coordinates.

0

Just Providing an example of Leonardos example (The diagram is scaled): enter image description here

            \documentclass[11 pt]{article}

            \usepackage[american]{circuitikz}
            \usepackage{adjustbox}

            \begin{document}
            \begin{center}
            \textbf{Induction Motor}
            \\
            \begin{adjustbox}{scale=0.6}
            \begin{circuitikz}[scale=1.4]
            \def\topy{2.5}
            \def\boty{0}
            \def\midx{3}
            \def\halfmidx{1.5}
            \def\farx{6}
            \def\halffarx{4.5}

            \draw(0,\topy) 
            to[open,v_=$V_\phi$,o-o] (0,\boty)
            to[short] (\midx,\boty)
            to[L=$j X_m$] (\midx,\topy)
            ;
            \draw (0,\topy)
            to[R=$R_1$] (\halfmidx,\topy)
            to[L=$j X_1$] (\midx,\topy)
            ;

            \draw(\midx,\topy)
            to[R=$R_2 $] (\halffarx , \topy)
            to[L=$j X_2$] (\farx , \topy)
            to[R=$R_2\frac{1-s}{s}$] (\farx,\boty)
            to[short] (\midx , \boty)
            ;

            \end{circuitikz}
            \end{adjustbox}
            \end{center}

            \end{document}
1
  • (1) some explanation should be add, at least what is the point of your answer, (2) essential your answer is equal to the comment of Martin Scharrer (from September 2011) .
    – Zarko
    May 7, 2016 at 16:23

You must log in to answer this question.

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