如何使用基于 circuitikz 的相对坐标在 circuitikz 电路内插入 tikzpicture?

如何使用基于 circuitikz 的相对坐标在 circuitikz 电路内插入 tikzpicture?

具体来说,我想在这个电路的两个开口端(R1 和地之间)插入一个矩形?

\documentclass[border=10pt]{standalone}
\usepackage[american,siunitx,smartlabels]{circuitikz}

\ctikzset{bipoles/ammeter/text rotate/.initial=0, rotation/.style={bipoles/ammeter/text rotate=#1},
}

\begin{document}

\begin{circuitikz}
\draw (0,0)
node[transformer,yscale=1.2] (T) {}
(T.B1) to [D,l=Diode] (3,|-T.B1)
to [R,l=3.3 <\kilo\ohm>] (3,|-T.B2)
-- (T.B2)
-- (12,|-T.B2);


\ctikzset{bipoles/resistor/height =0.3}
\draw (3,|-T.B1)
to [vR,l=$R_1{=} 0 $] (6,|-T.B1)
to (6,-0.2)
(12,|-T.B2) node [below=1pt]{X-Channel}
(6,|-T.B1) to [short,-*] ++(2,0) node [right=2pt]{Y-Channel}
(6,-1) to [short] ++ (2.2,0) node [ground,xscale=0.5,yscale=0.7] {}
(T) node [right=15pt,below=30pt,rotate = 90] {$\SI{9}\volt_{rms}$}
;
\end{circuitikz}
\end{document}

在此处输入图片描述

答案1

像这样?

\documentclass[border=10pt]{standalone}
\usepackage[american,siunitx,smartlabels]{circuitikz}

\ctikzset{bipoles/ammeter/text rotate/.initial=0, rotation/.style={bipoles/ammeter/text rotate=#1},
}

\begin{document}

\begin{circuitikz}
\draw (0,0)
node[transformer,yscale=1.2] (T) {}
(T.B1) to [D,l=Diode] (3,|-T.B1)
to [R,l=3.3 <\kilo\ohm>] (3,|-T.B2)
-- (T.B2)
-- (12,|-T.B2);


\ctikzset{bipoles/resistor/height =0.3}
\draw (3,|-T.B1)
to [vR,l=$R_1{=} 0 $] (6,|-T.B1)
to (6,-0.2)
(12,|-T.B2) node [below=1pt]{X-Channel}
(6,|-T.B1) to [short,-*] ++(2,0) node [right=2pt]{Y-Channel}
(6,-1) to [short] ++ (2.2,0) node [ground,xscale=0.5,yscale=0.7] {}
(T) node [right=15pt,below=30pt,rotate = 90] {$\SI{9}\volt_{rms}$}
(6,-0.9) rectangle +(2,0.6)
;
\end{circuitikz}
\end{document}

在此处输入图片描述

相关内容