Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like graphviz a lot, but I almost always end up using [Tikz](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.



Does it have graph-drawing included?


Yes, part of TikZ is a clone of Graphviz, but implemented in LaTeX.


And Lua for the more advanced layout calculations, which need LuaLaTeX.


That'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.


> 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



That'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.


Some of it is LaTeX, but the more intensive algorithms are done with embedded Lua, using LuaLaTeX. There is no external program.


Wow, 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 ...


Are you one of the authors of tikz graphdrawing?


Just a former student who participated in the first version (let's say draft) of it, which had no really interesting algorithms in it yet, just the overall graph framework and integration with the rest of PGF/TikZ.

Really cool project though, one of the few that made it outside of uni.


A 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: