4 ms·
I find manually laying out graphs and digraphs tedious. It seems like a problem that should be amenable to machine learning approaches. Basically, training a m
by jes 5y ago
I find manually laying out graphs and digraphs tedious.
It seems like a problem that should be amenable to machine learning approaches. Basically, training a machine as to what is an aesthetically pleasing layout and what is not.
Are there layout engines that use machine learning for layout, as against being implemented in terms of specific tree or graph layout algorithms?
- RGamma 5y agoRelevant search term: graph planarisation
- th0ma5 5y agoArguably a graph layout is performed by a kind of "training" in the sense that it takes many iterations for the parameters (and possibly physical distancing forces) to be evaluated for every node against all of the others. This is a solver, and not entirely unlike something like gradient descent. This is painting a rather broad brush with these terms, however.
- spockz 5y agoIt would be nice if there were a tool that would take the input to graphviz, run it to graphviz to get the layout and then use that to generate the tikz code using that layout.
- jimhefferon 5y agoYears ago I wrote and contributed a backend to graphviz that output MetaPost (I just had a look and don't see it in the source anymore). It was very easy; I found another backend and made a few tweaks. Perhaps you might have a look?
- nyir 5y agoTikZ/PGF had a graph layouting implementation for about a decade now, c.f. "Part IV - Graph Drawing" in the manual. And apparently `dot2tex` can also render TikZ instructions, so going via Graphviz is possible too.
- lottin 5y agoI don't think the difficulty in making diagrams has to do creating a layout that is aesthetically pleasing, but rather with expressing ideas visually in a way that others can understand them. I'm sceptical that AI can help with that.
- lrem 5y agoI'm pretty confident that it could be a good improvement over the currently used spring models. Give me three high-distance options that ML thought were good, I'll probably choose one over laying out manually.
- gradschool 5y agoTikZ claims some support for automated graph layout generation in chapter 26 of the manual [1]. It also lets you specify your own graph layout algorithms in Lua. Results in my experience aren't as aesthetic or intuitive as a custom layout but are comparable to graphviz. [1] https://tikz.dev/gd-overview https://tikz.dev/gd-overview edit: chapter 27 in the online version