3

Possible Duplicate:
Drawing a tree where many nodes have the same child in TikZ

I'm trying the draw a tree using the tikz package,

          \begin{center} 
          \begin{tikzpicture} [sibling distance=1.5cm]

          \node [size=0.3cm](topnode) at (0,5) { {\{\{1\}\{2\}\}\{3\}}\} } 
          child { node[size=0.3cm] {{\{\{1,2\}\{3\}}\}} }
          child { node[size=0.3cm] {{\{\{1,3\}\{2\}}\}} }
          child { node[size=0.3cm] {{\{\{2,3\}\{1\}}\}} }
          ;
          \node [size=0.3cm](topnode) {\{\{1,2,3\}\}}
%         \node[minimum width=3cm]  at (0,5) {\{\{1,2,3\}\}}
          ;
          \foreach \x in {-3}{
          \draw  (topnode-1) -- (bottomnode-\x);
          \draw  (topnode-3) -- (bottomnode-\x);
          \draw  (topnode-2) -- (bottomnode-\x);
          }

          \end{tikzpicture}
          \end{center}

My problem is how to approach a node (level) and how to connect the parent node to the node in level 3.

2
  • 2
    You can put a single node instead of a tree and draw the connections. In fact this is the same question with the previous one that you linked to.
    – percusse
    Jun 11, 2012 at 13:24
  • Does Drawing a tree where many nodes have the same child in TikZ solve your problem? If not, please specify why it doesn't. Also, your code samples should always be complete compilable documents (starting from \documentclass).
    – Jake
    Jun 11, 2012 at 13:50

0

Browse other questions tagged .