Circuitikz:只使朝向组件的线变粗,而不是组件本身

Circuitikz:只使朝向组件的线变粗,而不是组件本身

我想让通向 Rprobe 的线变粗,但电阻本身不要变粗

\documentclass[border=6pt]{standalone}
\usepackage[siunitx]{circuitikz}
\begin{document}
    
    \begin{circuitikz}
\draw (0,0) to[V,v=\qty{10}{\volt}, invert] (0,6)--(2,6) to[R,name=A] (2,3) to[R,name=B] (2,0)--(0,0);
\node[above,rotate=90] at (A.south) {\qty{100}{\kilo\ohm}};
\node[above,rotate=90] at (B.south) {\qty{100}{\kilo\ohm}};
\draw (4,3) to[R,name=C] (4,0)--(2,0);
\node[above,rotate=90] at (C.south) {$R_{\text{probe}}$};
\node[below,rotate=90] at (C.north) {\qty{1}{\mega\ohm}};
\draw [-Latex, line width=1.5pt] (4,3) -- (2,3);
\draw[-Latex, line width=1.5pt] (4,0) -- (2,0);
%\node[circ] at (4,3) {}; % Default label (you can customize it)
\node[above right] at (4,3) {$V_{\text{osc}}$};
\end{circuitikz}

\end{document}

在此处输入图片描述

答案1

虽然我不建议使用单独的节点来标记标签,但我会在这里发布最少的修改。

您使用的线宽为 1.5pt,比图表其余部分使用的默认 0.4pt 大 3.75 倍。因此,您必须将电阻器的线宽缩小到 1/3.75=0.2666:


\documentclass[border=6pt]{standalone}
\usepackage[siunitx]{circuitikz}
\begin{document}

\begin{circuitikz}
\draw (0,0) to[V,v=\qty{10}{\volt}, invert] (0,6)--(2,6) to[R,name=A] (2,3) to[R,name=B] (2,0)--(0,0);
\node[above,rotate=90] at (A.south) {\qty{100}{\kilo\ohm}};
\node[above,rotate=90] at (B.south) {\qty{100}{\kilo\ohm}};
% 0.2666 = 1/(1.5/0.4)
\draw[line width=1.5pt] (4,3) to[R,name=C,resistors/thickness=0.2666] (4,0)--(2,0);
\node[above,rotate=90] at (C.south) {$R_{\text{probe}}$};
\node[below,rotate=90] at (C.north) {\qty{1}{\mega\ohm}};
\draw [-Latex, line width=1.5pt] (4,3) -- (2,3);
\draw[-Latex, line width=1.5pt] (4,0) -- (2,0);
%\node[circ] at (4,3) {}; % Default label (you can customize it)
\node[above right] at (4,3) {$V_{\text{osc}}$};
\end{circuitikz}

\end{document}

在此处输入图片描述

顺便说一句,我觉得它看起来很糟糕,但是……另一个细节是,你可以看到下面的箭头看起来“不好”(这是由于--(2,0)探针电阻路径中的)以及右上角的粗线连接不稳定。要纠正这个问题:

\documentclass[border=6pt]{standalone}
\usepackage[siunitx]{circuitikz}
\begin{document}

\begin{circuitikz}
\draw (0,0) to[V,v=\qty{10}{\volt}, invert] (0,6)--(2,6) to[R,name=A] (2,3) to[R,name=B] (2,0)--(0,0);
\node[above,rotate=90] at (A.south) {\qty{100}{\kilo\ohm}};
\node[above,rotate=90] at (B.south) {\qty{100}{\kilo\ohm}};
% 0.2666 = 1/(1.5/0.4)
\draw[line width=1.5pt] (4,3) to[R,name=C,resistors/thickness=0.2666] (4,0);
\node[above,rotate=90] at (C.south) {$R_{\text{probe}}$};
\node[below,rotate=90] at (C.north) {\qty{1}{\mega\ohm}};
\draw [-Latex, line width=1.5pt] (4,3) to[short, .-] (2,3);
\draw[-Latex, line width=1.5pt] (4,0) to[short, .-] (2,0);
%\node[circ] at (4,3) {}; % Default label (you can customize it)
\node[above right] at (4,3) {$V_{\text{osc}}$};
\end{circuitikz}

在此处输入图片描述

详细信息请参阅手册第 6.4 节“路径组件之间的线连接”。

答案2

你可以这样做:

\documentclass[border=6pt]{standalone}
\usepackage[siunitx]{circuitikz}
\begin{document}
    
\begin{circuitikz}
\draw (0,0) to[V,v=\qty{10}{\volt}, invert] (0,6)--(2,6) to[R,name=A] (2,3) to[R,name=B] (2,0)--(0,0);
\node[above,rotate=90] at (A.south) {\qty{100}{\kilo\ohm}};
\node[above,rotate=90] at (B.south) {\qty{100}{\kilo\ohm}};
\draw [Latex-,line width=1.5pt] (2,3) -- (4,3);
\draw [-Latex,line width=1.5pt] (4,3) to [R,name=C,line width=0.4pt] (4,0) -- (2,0);
\node[above,rotate=90] at (C.south) {$R_{\text{probe}}$};
\node[below,rotate=90] at (C.north) {\qty{1}{\mega\ohm}};
%\node[circ] at (4,3) {}; % Default label (you can customize it)
\node[above right] at (4,3) {$V_{\text{osc}}$};
\end{circuitikz}
\end{document}

在此处输入图片描述

相关内容