Commutative diagrams with crossing edges
When one edge of a graph passes over or under another edge there may be a small gap needed in the drawing of one of those edges. An easy trick is to draw the upper edge two times: first with the background color and more thickness, afterwards normally, like
<node1> edge [-,line width=6pt,draw=white] <node2> edge <node2>
Here’s an example diagram used in the definition of the pull-back of a Banach bundle:
The source code:
\begin{tikzpicture} \matrix (m) [matrix of math nodes, row sep=3em, column sep=3em]{ & f^\ast E_V& & \vphantom{f^\ast}E_V \\ f^\ast E & & \vphantom{f^\ast}E & \\ & U & & V \\ M & & N & \\}; \path[-stealth] (m-1-2) edge (m-1-4) edge (m-2-1) edge [densely dotted] (m-3-2) (m-1-4) edge (m-3-4) edge (m-2-3) (m-2-1) edge [-,line width=6pt,draw=white] (m-2-3) edge (m-2-3) edge (m-4-1) (m-3-2) edge [densely dotted] (m-3-4) edge [densely dotted] (m-4-1) (m-4-1) edge (m-4-3) (m-3-4) edge (m-4-3) (m-2-3) edge [-,line width=6pt,draw=white] (m-4-3) edge (m-4-3); \end{tikzpicture} |
This topic was discussed on Matheplanet.com.
If you want to read more about commutative diagrams with TikZ have a look here: Chains with labeled edges.