# Scaling Components in Circuitikz so it doesn't disturb schematic

I have this code so far

First question: For the purose of the question, I think it would be a good thing to generate a picture, but I don't know how.

Then, the main question is on the sizing of components; I would like to understand how to scale down (or Up) a component, in this case a resistor (but it could also be useful to scale an Op-Amp). I have seen in another post that i could use /tikz/circuitikz/bipoles/length=.5cm with some scaling factor, but as you can see (from the image), I get issues with the wire and the node(the wire goes left, and the $$V_in$$ is far away to the right. So how do I scale the resistor so it doesn't mix everything else.

\documentclass[letterpaper, 12pt]{article}

\usepackage{fullpage} % changes the margin

\usepackage[utf8]{inputenc} %
\usepackage[T1]{fontenc}    %  Load a font with all the characters
\usepackage{lmodern}        %

\usepackage{enumerate}

\usepackage[french]{babel}

\usepackage{amssymb,amsmath,amsthm,amsfonts}
\usepackage{mathtools}

\usepackage[siunitx,american]{circuitikz}
\usetikzlibrary{circuits}
%\usepackage[retainorgcmds]{IEEEtrantools}
\usetikzlibrary{positioning}

\usepackage{graphicx}


%==================================%

\begin{circuitikz}
\draw
(0, 0) node[op amp] (opamp) {}
(opamp.-)
to ++(-.8,0)
(-2,0.5)    to [R,*-,l_=364.1<\ohm>](-2,-1)             node[ground]{}
(-2,0.5)    to [R,l=988<\ohm>](-2,2) -- (-4,2)
to [battery, l_=15<\volt>](-4,-.5)          node[ground]{}
(opamp.-) to[R,*-,l_=9.87<\kilo\ohm>]++(0,2)            node[ground,yscale=-1]{}
(opamp.+) to ++(0,-1) coordinate (leftR)
-- (leftR -| opamp.out)
to[short,-*] (opamp.out)
(opamp.out)  to[/tikz/circuitikz/bipoles/length=.5cm,R,l=10<\ohm>,xscale=0.5](5,0)          node[anchor=west]  {$V_{out}$}
;
\end{circuitikz}

• @john: Actually, yes i need it. Don't forget we are in circuitikz environnement. Jan 18, 2016 at 23:15

Is this what you were trying to do?

BTW, the \pgfextra{...} is only needed to call \ctikzset in the middle of a \draw (\path, \fill etc.) command. \ctikzset{\bipoles\length=5cm} will change the size of every component. (The widths and heights are multiplied by the length.)

\documentclass[border=1pt]{standalone}
\usepackage[siunitx,american]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw
(0, 0) node[op amp] (opamp) {}
(opamp.-)
to ++(-.8,0)
(-2,0.5)    to [R,*-,l_=364.1<\ohm>](-2,-1)             node[ground]{}
(-2,0.5)    to [R,l=988<\ohm>](-2,2) -- (-4,2)
to [battery, l_=15<\volt>](-4,-.5)          node[ground]{}
(opamp.-) to[R,*-,l_=9.87<\kilo\ohm>]++(0,2)            node[ground,yscale=-1]{}
(opamp.+) to ++(0,-1) coordinate (leftR)
-- (leftR -| opamp.out)
to[short,-*] (opamp.out)
\pgfextra{\ctikzset{bipoles/resistor/width=.4,
bipoles/resistor/height=.15}}
(opamp.out)  to[R,l=10<\ohm>](5,0)          node[anchor=west]  {$V_{out}$};
\end{circuitikz}
\end{document}


• Yop, that's perfect, Thks. Jan 19, 2016 at 2:32
• Is there a way to only affect (only)1 resistor(element). Because I think what you did is scale everything down. I think I will have to scale everything back to normal after, right ? Jan 19, 2016 at 2:36
• And by the way, how do we scale everything back to normal @John Kormylo Jan 19, 2016 at 2:39
• The initial width=.8 and height=.3. Just call \ctikzset again. I thought there was a way to only affect one element, but so far no joy. Jan 19, 2016 at 3:40
• thanks,actually the /tikz/circuitikz/bipoles/length=.5cm command work just fine for that. Ithink I missplaced something(maybe the xscale=0.5) that's why it didn't show up properly. Jan 19, 2016 at 3:41
\begin{figure}      % Suiveur
\centering
\begin{circuitikz}
\draw
(0, 0) node[op amp,yscale=-1] (opamp) {}
(opamp.-)
to ++(-.8,0) -|
(-2,-0.5)   to [R,*-,l_=364.1<\ohm>](-2,-2.5)           node[ground]{}
(-2,-0.5)   to [R,l=988<\ohm>](-2,1.5) -| (-4,1.5)
to [battery, l_=15<\volt>](-4,-2.5)         node[ground]{}
(opamp.-) to[R,*-,l=9.87<\kilo\ohm>]++(0,-2)            node[ground]{}
(opamp.+) to ++(0,1) coordinate (leftR)
-- (leftR -| opamp.out)
to[short,-*] (opamp.out)
(opamp.out)  to[/tikz/circuitikz/bipoles/length=1.cm,R,l=10<\ohm>](3,0)             node[anchor=west]  {$V_{out}$}
;
\end{circuitikz}
\caption{Circuit suiveur}
\label{suiveur}
\end{figure}


• altought I'm really not sure how to use { -| } properly :) Jan 19, 2016 at 3:53