What is the proper way to draw a hypergraph? Is there a package to do this, or is there an easy way to draw such diagrams with a common drawing method like tikz?
I'm trying to draw something like

|
What is the proper way to draw a hypergraph? Is there a package to do this, or is there an easy way to draw such diagrams with a common drawing method like tikz? I'm trying to draw something like
|
||||
|
|
|
It is -- of course -- posible to draw diagrams like this with TikZ. However, as far as I know there is no automatic placement for things like this. Once one gets the hang of guessing distances, it is fairly easy to reproduce graph like the example in TikZ:
I think the code is fairly self-explanatory: First the vertice coordinates are specified. Then all the areas are drawn with the help of
This is not a perfect copy of the original image. With some more fiddling around with the coordinates and some additional points in the paths one could get closer. |
||||
|
I have to confess myself not particularly enamored of the example given: it looks messy to me. I find it hard to separate the edge labels from the vertex labels, and the extra wiggliness of the edges is there for no good reason. I would imagine that for it to be worth drawing such a diagram, it cannot be too complicated (imagine drawing the hypergraph corresponding to the powerset of even 3 elements). So here's an attempt at making a cleaner diagram. Again, it uses TikZ, but by making the diagram more stylised, I can get away with some tricks. In particular, note that the edges are done by drawing really thick lines between the vertices.
Here's the picture:
For more complicated graphs, I would see if I could get graphviz or something like that to generate it, and then get TikZ to render it. |
|||||||||||||
|