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

It's not that complex, actually. Here's how the basic usage works: you have a text file containing something like this for an undirected graph --

graph graphname { a -- b -- c; b -- d; }

-- or like this for a directed graph (the -> arrows show you which direction the links are going):

digraph graphname { a -> b -> c; b -> d; }

You can break up that first line into a -> b and b -> c and get the same graph if you want. It's not necessary here but it is when you have lots of outgoing links from the same node.

The other things you can type in are basically formatting options for the various utilities. You then feed these text files to various command line tools to do things like get a PNG of your graph:

dot -Tpng my_text_file.dot -o my_graph_image.png

That's it. The rest is just playing with it to get what you want.



Ah, well, that doesn't look so bad. I'll have to play around with it. Thanks.


Yeah, it's more the size of it that comes off as imposing at first. I was able to find a decent tutorial when I had to use it and went through the very basic usage of "make a graph and get a PNG with a few formatting options" but there's a lot more available if you have need of it.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: