9

How can I draw a hypergraph structure (a.k.a. forest) like this:

forest

(Note: This is not a duplicate of this question, of course, since that drawing is very different.)

Frank
  • 7,175
  • how did you create the original? (i am interested in making something similar to your graph and would like to know how others make theirs). – Trevor Boyd Smith Jun 15 '11 at 14:48
  • I didn't create it. I found it in this paper: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.164.1174&rank=3 (see PDF link on the right) – Frank Jun 15 '11 at 16:57

1 Answers1

6

I give only the structure but you can make this by hand "easily". I don't have enough time to finish the graph but you need only to define some nodes and then you put the arrows. The last arrows are simple.

\documentclass[11pt]{article} 
\usepackage[upright]{fourier} 
\usepackage{tikz}
\usetikzlibrary{arrows,calc}

\begin{document}
\begin{tikzpicture}
\node(A){$NPB_{0,1}$} ;
\node(B) at ($(A)+(2,0)$){$CC_{1,2}$} ; 
\node(C) at ($(B)+(2,0)$){$P_{1,2}$} ;   
\node(D) at ($(C)+(2,0)$){$NPB_{2,3}$} ;   
\node(E) at ($(D)+(2,0)$){$VV_{3,4}$} ;   
\node(F) at ($(E)+(2,0)$){$AS_{4,5}$} ;   
\node(G) at ($(F)+(2,0)$){$NPB_{5,6}$} ; 
\node(Deb) at (5,8){$IP_{0,6}$};
\node(FF) at ($(F)+(0,4)$){$VBP_{3,6}$} ;  
\node(BB) at ($(B)+(0,5)$){$NP_{0,3}$} ; 
\draw[->] (A) to[out=90,in=180] (3,7)--(4,7) to[out=0,in=-90](Deb); 
\draw[rounded corners=2cm,
       dashed,->] (FF)to[out=90,in=-60] ($(Deb)+(.5,0)$);
\draw[dashed,->] (A) to [in =-90,out =90](BB);
\draw[dashed,->] (BB) to [in =-180,out =90] ++(2,1) to [out=0,in=-70]($(Deb)+(.5,0)$);
\end{tikzpicture}
\end{document}

enter image description here

Alain Matthes
  • 95,075
  • Thanks, that looks great! It doesn't compile for me though. It complains about the ++(2,1) in the last draw command: ( expected after the first plus. Sorry if this is a trivial thing to fix, but I don't speak tikz (yet). – Frank Jun 16 '11 at 16:53
  • @Franck Strange error ! the code compiles for me. What you get with : \tikz\draw[in =-180,out =90] (0,3) to ++(9,-2); ? Which pgf version do you use ? – Alain Matthes Jun 18 '11 at 15:23
  • This figure looks great, but I also get the same error on Ubuntu with texlive and on Windows with Miktex. On Ubuntu the pgf version is 2.00-1. I get "! Package tikz Error: ( expected." error when substituting the command in the above comment. – Paul Dixon Dec 22 '11 at 08:36
  • 1
    You can install pgf 2.10 on your personal folder texm – Alain Matthes Dec 23 '11 at 11:22