logoalt Hacker News

WalterGRtoday at 1:12 AM1 replyview on HN

Graph layout is a very interesting, very hard problem.

There's even a yearly competition - started in 1994 - whose results are announced at the yearly Symposium on Graph Drawing and Network Visualization.

It's not a subject I'm versed in, but can you talk more about your solution? Do you use a larger constraint solver or is it hand-coded?

--

Competition: https://mozart.diei.unipg.it/gdcontest/

The 34th International Symposium on Graph Drawing and Network Visualization, to be held in Ontario, Canada: https://graphdrawing.github.io/gd2026/

n.b. It's an independent conference, not under the auspices of e.g. IEEE or ACM.


Replies

jumpalongjimtoday at 8:21 AM

Neither, really — it's closer to hand-rolled local search.

My first three phases are based on Sugiyama to produce a seed layout (which is broadly what Dagre does). Then I've added my new phases driven by a penalty score that grades candidate layouts using fourteen factors that I devised from my experience laying out graphs manually. The refinement phase is where the bulk of my work is. It applies targeted move types iteratively within a budget, trying to lower the penalty score.

Finally, the result goes through my own embedding and rendering with the theme system on top.