# connect line to an unknown coordinate TIKZ

Is it possible to connect the source of M0 to a line defined in the beginning of the code?

\path (0,0) coordinate (GND); %% the line below


the transistor: I don't know exactly the coordinates of the drain and source

\draw   (nC15) ++(1,0) node[nmos,anchor=gate,scale=1.5](M0){}
(M0.drain) node[above right]{$M_0$}  ;

• please add a complete and compileable minimum example – AndréC Aug 15 '19 at 10:36
• Can you please show us a short compilable tex code what you have tried so far? As with your previous question, your question doesn't explain exactly what you want. Then we do not have to guess what you are doing (and wanting). – ferahfeza Aug 15 '19 at 10:44

You can name node or coordinate and then use those names to draw lines. See the code below. I have defined a node (gnd) at (0,0) and later, the connection is made from nmos source terminal to (gnd).

\documentclass[border=3mm]{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\node[ground] (gnd) at (0,0){}; % node (gnd) at (0,0)
\draw   (2,4) ++(1,0) node[nmos,anchor=gate,scale=1.5](M0){}
(M0.drain) node[above right]{$M_0$}  ;
\draw (M0.source) |- (gnd); % draw from source to gnd
\end{circuitikz}
\end{document}


Output:

• Is it also possible to get a circle(a connection point) at the intersection of the source and the gnd line? – tairebit Aug 15 '19 at 14:43
• @tairebit I have not defined a ground line. I defined a point gnd and drew connection to that point. But yes. One can draw a gnd line and It is possible to have connection point. See this example – nidhin Aug 15 '19 at 15:25