5 ms·
I like graphviz a lot, but I almost always end up using [Tikz](http://www.ctan.org/tex-archive/graphics/pgf/ http://www.ctan.org/tex-archive/graphics/pgf/), whi
by Schiphol 6y ago
I like graphviz a lot, but I almost always end up using [Tikz](http://www.ctan.org/tex-archive/graphics/pgf/ http://www.ctan.org/tex-archive/graphics/pgf/), which is quite a bit more flexible.
One huge advantage of Tikz is that you can use LaTeX equations natively. E.g. subscripts and superscripts in graphviz involve jumping through a few hoops, iirc.
- pletnes 6y agoDoes it have graph-drawing included?
- kragen 6y agoYes, part of TikZ is a clone of Graphviz, but implemented in LaTeX.
- mkl 6y agoAnd Lua for the more advanced layout calculations, which need LuaLaTeX.
- Schiphol 6y agoThat's one of its main uses. One thing it does not do (or I don't know how) and graphviz does, though, is arranging nodes intelligently so as to minimize clutter and edge distances. That's one of the nice things in graphviz.
- enriquto 6y ago> One thing it does not do (or I don't know how) and graphviz does, though, is arranging nodes intelligently That's exactly what "graph drawing" means [0]. Can tikz choose the position of the vertices itself or you have to specify the positions yourself? If it is you who chooses the positions, then tikz does not do "graph drawing". [0] https://en.wikipedia.org/wiki/Graph_drawing https://en.wikipedia.org/wiki/Graph_drawing
- deleted 6y ago[deleted]
- mkl 6y agoYes, TikZ can position the vertices itself. E.g. http://www.tcs.uni-luebeck.de/downloads/papers/2011/2011-configurable-graph-drawing-algorithms-jannis-pohlmann.pdf http://www.tcs.uni-luebeck.de/downloads/papers/2011/2011-con... http://www.tcs.uni-luebeck.de/downloads/mitarbeiter/tantau/2012-gd-presentation.pdf http://www.tcs.uni-luebeck.de/downloads/mitarbeiter/tantau/2... https://tex.stackexchange.com/questions/203692/how-to-automatically-draw-a-graph https://tex.stackexchange.com/questions/203692/how-to-automa...
- enriquto 6y agoThat's great! Did these people really implement graph drawing algorithms as latex macros, or does it call an external program? I'm afraid to look it myself, lest I discover the truth.
- mkl 6y agoSome of it is LaTeX, but the more intensive algorithms are done with embedded Lua, using LuaLaTeX. There is no external program.
- nyir 6y agoWow, that was a long time ago, very fun project to work on. But yeah, without deep knowledge of the TeX side you'd likely still struggle a bit to understand how the two sides interact, at least it was a bit of a struggle for me, maybe / hopefully it got a bit better in the meantime. And thankfully LuaLaTex was ready enough at that time, I can't imagine how bad it would've been to do this in pure Tex ...
- enriquto 6y agoAre you one of the authors of tikz graphdrawing?
- programLyrique 6y agoA library of pgf/tikz that requires lualatex can do graph drawing. It is called "graphdrawing" actually. It can do the layout automatically and so on. You can add new automatic layouts using lua. It's described in part IV of the pgf manual.