我正在使用以下代码
\documentclass[11pt,a4paper]{book}
\usepackage{tikz}
\usepackage[american voltages, american currents]{circuitikz}
\usetikzlibrary{%
calc,%
fadings,%
shadings%
}
\usetikzlibrary{arrows,snakes,shapes}
\begin{document}
\begin{figure}
\centering
\begin{circuitikz}%MM structure
%PCB
\draw[rounded corners, color=Darkgreen, fill=green, path fading=south] (0,0) rectangle (11,0.6);
\draw node at (11.4,0.1) {\footnotesize \textcolor{Darkgreen}{\eng{PCB}}};%name it
%Read-Out Strips
\draw[color=orange, fill=orange] (1,0.6) rectangle (2,1);
\draw[color=orange, fill=orange] (3,0.6) rectangle (4,1);
\draw[color=orange, fill=orange] (5,0.6) rectangle (6,1);
\draw[color=orange, fill=orange] (7,0.6) rectangle (8,1);
\draw[color=orange, fill=orange] (9,0.6) rectangle (10,1);
\draw node at (11.4,0.8) {\footnotesize \textcolor{orange}{\eng{Strips}}};%name it
\draw node[ground] at (1.5,-1) {};
\draw node at (1.5,-1) {} to [R] (1.5,0);%<--------This is what I want to do
%\draw node[ground] to [R] (1.5,-1);
%\draw node[R] at (1.5,0) {};
%Micro-Mesh
\draw[very thick, color=gray, dashed] (0,3) -- (11,3);
\draw node at (11.4,3) {\footnotesize \textcolor{gray}{\eng{Mesh}}};%name it
\draw (0,3.5) -- (0,2.5) -- (-0.5,3) -- (0,3.5);
\draw node at (-1,3) {\footnotesize \eng{-HV}};%name it
\draw node at (-2,1.8) {\footnotesize \eng{Amplification}};
\draw node at (-2,1.4) {\footnotesize \eng{Gap}};
%Drift
\draw[very thick, color=gray] (0,6) -- (11,6);
\draw node at (11.4,6) {\footnotesize \textcolor{gray}{\eng{Drift}}};%name it
\draw (0,6.5) -- (0,5.5) -- (-0.5,6) -- (0,6.5);
\draw node at (-1,6) {\footnotesize \eng{-HV}};%name it
\draw node at (-2,4.8) {\footnotesize \eng{Drift}};
\draw node at (-2,4.4) {\footnotesize \eng{Region}};
%Particle's track
\draw[color=red,->] (0.2,7) -- (11.4,-1);
\draw node at (2.5,6.5) {\footnotesize \textcolor{red}{\eng{Particle's Track}}};%name it
%electron
\draw (3,5) --(3.2,3);
\draw node at (1.5,4) {\eng{Primary's}};
\draw node at (1.6,3.6) {\eng{track}};
%avalanche
\draw[very thick, red, rotate=0, fill=red] (3.15,3) .. controls (2.15,0.4) and (4.25,0.4) .. (3.25,3);
\draw[color=red] node at (1.8,1.5) {\eng{Avalanche}};
\end{circuitikz}
\caption{}%
\label{}%
\end{figure}
\end{document}
我要做的就是在第一个橙色矩形下方放置一个电阻器和接地。虽然接地放置的位置正确,但电阻器却没有。我不知道如何解决这个问题……欢迎提出任何建议!
答案1
您正在使用\draw
其动态放置节点,但随后为节点提供明确的坐标,这将覆盖先前的机制。
\documentclass[11pt,a4paper]{book}
\usepackage[american voltages, american currents]{circuitikz}
\usetikzlibrary{fadings}
\begin{document}
\begin{circuitikz}
\draw[rounded corners, fill=green, path fading=south] (0,0) rectangle (11,0.6);
\draw node at (11.4,0.1) {\footnotesize \textcolor{green}{PCB}};%name it
\draw[color=orange, fill=orange] (1,0.6) rectangle (2,1);
\draw[color=orange, fill=orange] (3,0.6) rectangle (4,1);
\draw[color=orange, fill=orange] (5,0.6) rectangle (6,1);
\draw[color=orange, fill=orange] (7,0.6) rectangle (8,1);
\draw[color=orange, fill=orange] (9,0.6) rectangle (10,1);
\draw node at (11.4,0.8) {\footnotesize \textcolor{orange}{Strips}};%name it
\draw (0.5,0) to[R] (2.5,0) --++(0.2,0) node[ground] {};
\end{circuitikz}
\end{document}