Live data from Hacker News

Create diagrams with code using Graphviz

ncona.com

41–50 of 221 posts

Re: Create diagrams with code using Graphviz

#41

I ended up with a different tool, but I was uncomfortable using drawing apps for diagrams, and only rarely included them in my blog until I could use text to define them. I’m all-in on Markdown + Github for writing, so working with text-driven diagrams is a natural fit.

What tool did you use? I’ve been using mermaid and its markdown plug-ins and like it quite a bit, but am always looking for new ways.

Re: Create diagrams with code using Graphviz

#43
post #34

A couple of important tips that the article omits: 1. For manual editing, dot -Tx11 foo.dot displays the graph in a window and updates it automatically whenever you save . So you can have an editor window open and the dot window and see the results of every tweak. For automatically generated graphs, this provides you with a window that you can update by overwriting a file with a new graph description. 2. Although HTM…

3. dot pairs nicely with m4 [1] and a Makefile. Without m4, it's a pain to apply a uniform style on groups of nodes.

[1] https://en.wikipedia.org/wiki/M4_(computer_language)

Re: Create diagrams with code using Graphviz

#46

I use GraphViz a lot. Here it the Twitter conversation that ensued when I asked a question about the use of Group Theory "In Real Life": https://www.solipsys.co.uk/Chitter/GroupTheory_IRL.svg

Ha nice visualisation. Would be amazing if this was available for more chat systems where conversations branch like this.

Also, as a side note its funny that there is a lot of discussion (including Baez!) about theoretical maths, and one lone tweet about molecular symmetry.

Re: Create diagrams with code using Graphviz

#48
I found a great use for Graphviz recently. I needed to implement a model that was created by a scientist with no programming experience outside of a Fortran class in the early 1980s. Meanwhile, I didn't have much knowledge of the subject matter or terminology. The model was described in a multipage Excel file and an accompanying PDF and I implemented it in Clojure.

In order to help us communicate, I wrote a script that built a data-dependency graph directly from the code and produced a diagram with Graphviz for the scientist to review. It helped us to catch a couple errors resulting from my misinterpretations and it gave the scientist confidence that the code accurately reflected his design.

Re: Create diagrams with code using Graphviz

#49
post #44

Graphviz is for noobs. Try TikZ, aka the Gigachad of vector graphics. I spent more time creating TikZ diagrams than actually writing my whole MSc. thesis.

> Graphviz is for noobs. Try TikZ, aka the Gigachad of vector graphics.

Maybe you are right, in today's decaying world. But any civilized person can see that tikz, latex and even graphviz are all ultimately hipster tools. Real men of course use pic and troff.

Re: Create diagrams with code using Graphviz

#50

I use GraphViz a lot. Here it the Twitter conversation that ensued when I asked a question about the use of Group Theory "In Real Life": https://www.solipsys.co.uk/Chitter/GroupTheory_IRL.svg

Ha nice visualisation. Would be amazing if this was available for more chat systems where conversations branch like this. Also, as a side note its funny that there is a lot of discussion (including Baez!) about theoretical maths, and one lone tweet about molecular symmetry.

I have the same system for Mastodon ... works well to help visualise the complex discussions that sometimes happen.
Post reply on HN