lines crossing each other (and making way for each other) in tikz


/ Published in: LaTeX
Save to your folder(s)



Copy this code and paste it in your HTML
  1. \begin{tikzpicture}[cross line/.style={preaction={draw=white,->,line width=6pt}}]
  2. \node (S) at (0,0) {a};
  3. \node (2) at (0,4) {b};
  4. \node (P) at (4,0) {c};
  5. \node (P2) at (4,4) {d};
  6.  
  7. \node (w) at (2,2) {a1};
  8. \node (W) at (2,6) {b1};
  9. \node (Pw) at (6,2) {c1};
  10. \node (PW) at (6,6) {d1};
  11.  
  12. \draw[->](S) -- (2);
  13. \draw[->](S) -- (P);
  14. \draw[->](P) -- (P2);
  15.  
  16. \draw[->](w) -- (W);
  17. \draw[->](w) -- (Pw);
  18. \draw[->](W) -- (PW);
  19. \draw[->](Pw) -- (PW);
  20.  
  21. \draw[->](S) -- (w);
  22. \draw[->](P) -- (Pw);
  23.  
  24. \draw[->](2) -- (W);
  25. \draw[->](P2) -- (PW);
  26. \draw[cross line,->] (2) -- (P2);
  27. \end{tikzpicture}

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.