I have a graph in TikZ. It can be planar, and I know what change I need to make to make it planar but I can't work out how to communicate this to TikZ.
I wish to force the NTN node to be to the left of the RvNN and/or RNN nodes. Which sounds fairly simple.
MWE:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{layered}
\begin{document}
\begin{tikzpicture}[
sibling sep=20mm,level sep=10mm, node distance=10mm
]
\graph[layered layout]{%
NN -> { NTN, RNN, AE };
RvNN -> { RvNTN,RvNTN, RAE};
RNN ->RvNN;
NTN-> RvNTN;
AE->RAE;
};
\end{tikzpicture}
\end{document}
It is fairly easy for me to look at many graphs and say what node order swaps need to be made so they can be drawn planar.
But a few related questions:
- Why does PGF/TikZ 3.0 draw my simple layered graph as non-planar by default?
- Use "layered layout" with user-specified node ordering (i.e., without crossing minimization)
Have got me thinking maybe this is very hard.
I tried fiddling with edge weights and minimum layers, but got no where, and mostly made things worse.


minimum layersoption as in your first link so that TikZ can try to detect the crossings? Also I think you need to put that branch earlier – percusse Sep 09 '15 at 12:13