2

enter image description here

How can I draw a arrow edge curve over two node or between two point in circuitikz. I have added MWE...

\begin{circuitikz}
  \draw (0,0) to [twoport,t=G,v^<= .] (2,0) (2,0) -- (4,0)node[anchor=west]{AG} (2,0) |- (4,-1)node[anchor=west]{AG} (-1,0)node[anchor=east]{A} --(0,0) (6,-0.5)node[]{\Large$\Rightarrow$} (8,0)node[anchor=east]{A} (9,0) (10,0) to [twoport,t=G] (12,0)node[anchor=west]{AG} (10,-1.5) to [twoport,t=G] (12,-1.5)node[anchor=west]{AG} (8,0) -- (10,0) (9,0) |- (10,-1.5) ;
\end{circuitikz} 
  • The tricky bit it putting a arrowhead in the middle. Otherwise you can use an arc or to[bend right]. See the tikz manual for details. – John Kormylo May 20 at 23:58
2

As John mentioned, one option for the curved line is to[bend left]. For the arrow tip you can use the decorations.markings library of TikZ.

enter image description here

\documentclass[border=5mm]{standalone}
\usepackage{circuitikz}
\usetikzlibrary{decorations.markings} % <-- required
\begin{document}
\begin{circuitikz}
 \draw 
      (0,0) coordinate(a) to [twoport,t=G] (2,0) coordinate (b) % <-- I added two coordinates here
      (2,0) -- (4,0)node[anchor=west]{AG}
      (2,0) |- (4,-1)node[anchor=west]{AG}
      (-1,0) node[anchor=east]{A} --(0,0)
      (6,-0.5) node[]{\Large$\Rightarrow$}
      (8,0) node[anchor=east]{A} (9,0)
      (10,0) to [twoport,t=G]
      (12,0) node[anchor=west]{AG}
      (10,-1.5) to [twoport,t=G]
      (12,-1.5) node[anchor=west]{AG}
      (8,0) -- (10,0)
      (9,0) |- (10,-1.5) ;

\draw [decoration={
         markings,
         mark=at position 0.5 with \arrow{>} % arrow head halfway along the path
         },
       postaction={decorate},
       dashed
       ]
     % draw the line between the coordinates defined previously.
     (a) to[bend left=90, looseness=1.2] (b);      
 \end{circuitikz} 

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.