Lattice Layout


I'm doing some research on concept lattice. And I want to implement the
program with graph_tool. Can I use graph_tool API to draw a lattice-like
graph similar to the picture below?



Best regards,

attachment.html (784 Bytes)

Please take a look at the documentation for the graph_draw()
function. You are freely allowed to select node shapes and text
labels. Currently, however, the choice of node shapes is somewhat
limited. You can't, for instance, select a node shape which is
rectangular, i.e. with different height and width.


Actually, what I mean is how to generate the topology of the graph like
that picture but not the shape or label of the nodes. The position of top
and bottom node is fixed and the others are placed layer by layer. I tried
to use sfdp and fruchterman layout to draw, but none of them is satisfied.
Is that mean I must write an algorithm to generate the layout by my own?

在 2014年3月19日星期三UTC+8下午5时51分41秒,Tiago Peixoto写道:

attachment.html (2.08 KB)

There are some other possible layouts with graphviz, via
graphviz_draw(), but I'm not sure if it will give you what you
want. Otherwise, you will have to code the layout yourself.