我想问你,如何在我的 Circuitikz 绘图中缩放运算放大器的尺寸。我尝试
\ctikzset{tripoles/op amp/scale=0.5}
但不幸的是它不起作用。我在《circuitikz手册。
微电子工程协会
\begin{circuitikz}[scale=1, every node/.style={scale=1}]
\ctikzset{resistor=european}
\draw (0,0) node[op amp] (opamp) {};
\node [left=0.1cm of opamp.-] (p1) {};
\node [left=0.1cm of opamp.+] (p2) {};
\node [above=0.8cm of p1] (A) {};
\node [left=1.5cm of A] (p3) {};
\node [right=2.7cm of A, coordinate](C) {};
\node [right=0.8cm of C] (p6) {};
\node [below=0.8cm of p2] (B) {};
\node [left=1.5cm of B] (p4) {};
\node [right=2.5cm of B] (ground) {};
\node [right=0.1cm of opamp.out, coordinate] (vo) {};
%%% Draw connections
\draw (p3) node[left] {$u_1$} to[R=$R_1$,o-] (A) to[R=$R_2$,*-] (C);
\draw (opamp.-) to[short] (p1) to[short] (A);
\draw (opamp.out) to[short] (vo);
\draw (vo) to[short,-*] (vo |- C);
\draw (p4) node[left] {$u_2$} to[R=$R_3$,o-] (B) to[R=$R_4$,*-] (ground) node [sground] {};
\draw (opamp.+) to[short] (p2) to[short] (B);
\draw (C) to[short,-o] (p6) node[right] {$u_{0}$};
\node[above] at (A) {A}; % text
\node[below] at (B) {B}; % text
\end{circuitikz}
答案1
嗯,正在寻找这个老问题的答案......在我看来,它们的结果有点奇怪(没用),尽管它们正确地展示了如何扩展放大器的可能性。
答案和问题都给出了非常不寻常的结果(在我看来是错误的)。要按照通常的方式绘制这个电路(稍微缩小一点),我建议除了放大器形状外,还要amp symbol
相应地缩放电阻器尺寸(所有元件的尺寸都将平衡),并改变绘制电路的方式:
\documentclass[border=3.141592]{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}[european]
\ctikzset{resistors/scale=.6,
amplifiers/scale=0.8,
amp symbol font={\footnotesize}
}
\draw (0,0) node[op amp] (oa) {}
(oa.-) to [short, -*] ++ ( 0,1) coordinate[label=above:A] (A)
to [R, a=$R_1$,*-o] ++ (-2,0) node[left] {$u_1$}
(A) to [R=$R_2$] ++ ( 2,0) coordinate (C)
to [short, *-o] ++ ( 1,0) node[right] {$u_o$}
(C) |- (oa.out)
(oa.+) to [short, -*] ++ (0,-1) coordinate[label=below:B] (B)
to [R, a=$R_3$,*-o] ++ (-2,0) node[left] {$u_1$}
(B) to [R=$R_5$] ++ ( 2,0) node [sground] {}
;
\end{circuitikz}
\end{document}
我不确定上面的 MWE 和得到的结果是否是 OP 想要的。至少建议的 MWE 与 OP MWE 相比要短得多,也简单得多。
答案2
在节点生成时使用比例。
\node[op amp, scale = xx]
答案3
运算放大器属于放大器类(见手动的\ctikzset{tripoles/op amp/scale=0.5}
),因此,如果你用以下代码替换,你的例子应该可以工作\ctikzset{amplifiers/scale=0.5}
\begin{circuitikz}[scale=1, every node/.style={scale=1}]
\ctikzset{resistor=european, amplifiers/scale=.7}
\draw (0,0) node[op amp] (opamp) {};
\node [left=0.1cm of opamp.-] (p1) {};
\node [left=0.1cm of opamp.+] (p2) {};
\node [above=0.8cm of p1] (A) {};
\node [left=1.5cm of A] (p3) {};
\node [right=2.7cm of A, coordinate](C) {};
\node [right=0.8cm of C] (p6) {};
\node [below=0.8cm of p2] (B) {};
\node [left=1.5cm of B] (p4) {};
\node [right=2.5cm of B] (ground) {};
\node [right=0.1cm of opamp.out, coordinate] (vo) {};
%%% Draw connections
\draw (p3) node[left] {$u_1$} to[R=$R_1$,o-] (A) to[R=$R_2$,*-] (C);
\draw (opamp.-) to[short] (p1) to[short] (A);
\draw (opamp.out) to[short] (vo);
\draw (vo) to[short,-*] (vo |- C);
\draw (p4) node[left] {$u_2$} to[R=$R_3$,o-] (B) to[R=$R_4$,*-] (ground) node [sground] {};
\draw (opamp.+) to[short] (p2) to[short] (B);
\draw (C) to[short,-o] (p6) node[right] {$u_{0}$};
\node[above] at (A) {A}; % text
\node[below] at (B) {B}; % text
\end{circuitikz}