3

Consider the following minimal example:

\documentclass{minimal}
\usepackage{tikz}
  \usetikzlibrary{graphs,graphdrawing,shapes.multipart}
    \usegdlibrary{trees}

\begin{document}
\tikz[every node/.style={rectangle split,rectangle split parts=2,draw}]{
  \graph[tree layout,grow=0] {
    a/a\nodepart{two}1;
    b/b\nodepart{two}2;
    c/c\nodepart{two}3;
    a -- {b, c};
  };
}
\end{document}

The result (with PGF 3.0.1) is:

graph with multipart nodes and wrong connections

There is an incorrect edge in the sense that the line corresponding to a -- c does not stop at the edge of node a. Is this a bug or intended? How could I work around it?

2

It seems to be, because the boxes are transparent. I tried this:

\documentclass{minimal}
\usepackage{tikz}
  \usetikzlibrary{graphs,graphdrawing,shapes.multipart}
    \usegdlibrary{trees}

\begin{document}
\tikz[every node/.style={rectangle split,rectangle split parts=2,draw, fill=white}]{
  \graph[tree layout,grow=0] {
    a/a\nodepart{two}1;
    b/b\nodepart{two}2;
    c/c\nodepart{two}3;
    a -- {b, c};
  };
}
\end{document}

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.