I am trying to use tikz library to generate graphs where some nodes have multiple input edges and I would like they would be separated when they hit the node but I have failed so far. This is an example of graph I am trying to create: enter image description here

I appreciate if someone could suggest a way to create this graph.


Like this?

\begin{tikzpicture}[node distance=5cm,
    every node/.style={fill=white}, align=center,scale=0.75]
    % Specifications for style of nodes:
            base/.style = {rectangle, rounded corners, draw=black,
                           minimum width=1cm, minimum height=2cm,
                           text centered, font=\sffamily},
    process/.style = {base, minimum width=2cm, fill=orange!15},
    process1/.style = {base, minimum width=2cm,minimum height=1cm, fill=orange!15},
  % Specification of nodes (position, etc.)
\node (1) [process]   {$=$}; 
\node (2) [process, right of=1]   {X$_\tau$}; 
\node (3) [process, below of=2]   {$=$};
\node (4) [process, above of=2]   {$=$}; 
\node (5) [process, right of=2]   {X$_\sigma$};
\node (6) [process, right of=4]{$\zeta$};
\node (7) [process1, above of=5,yshift=-2.5cm]{$=$};
\node (8) [process, right of=7]{$\phi$};
\node (9) [process, right of=8]{$\lambda$};
\node (10) [process, below of=8,yshift=-10cm]{$=$};
  \draw (1.west)--++(180:2)node[left]{$\tau$};
  \draw (1.east) -- (2.west)node[midway,above=2mm]{$\tau$};
  \draw (3.west)--++(180:2)node[left]{$a$};
  \draw (2.north)--(4.south)node[midway,left=2mm]{$q$};
  \draw (2.south)--(3.north);
  \draw (2.east)--(5.west);
  \draw (4.east)--(6.west);
  \draw (3.east)node[above=2mm,xshift=20mm]{$a$}-|(5.south);
  \draw (5.north)--(7.south)node[midway,right=2mm]{$f$};
  \draw (2.60)|-(7.west)node[midway,above=2mm,xshift=20mm]{$f$};
  \draw (7.east)--(8.west)node[midway,above=2mm]{$f$};
  \draw (1.south)--++(-90:8)--++(0:16)--++(90:9)-|(5.east);
  \draw (3.south)--++(-90:3)-|(9.south);
  \draw (10.north)|-(5.20);
  \draw (10.west)--++(180:2)node[left]{$r$};
  \draw (10.east)--++(0:2)node[right]{$r$};
  \draw (10.south)--++(-90:2)node[left]{$r$};

enter image description here

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.