Are GraphViz dot files deterministic?

2019-03-28 11:42发布

问题:

I am making some GraphViz dot graphs within my source code using Doxygen.

Question: Are the graphs produced by a specific dot file guaranteed to always produce the same output?

Is this the case for different computers, at different times of day, on different architectures, etc?

I am considering using compass points to refine my graph and make it look nicer.

I am wondering if there is any "randomness" to the initial seeding of the graph layout, or any "implementation-defined" portions to the layout engine. I don't want to go to a lot of effort to optimize output for my system, if it won't look the same on others systems. This will be used by both Windows and Mac users. TIA

回答1:

I 've experimenting a lot with different rendering environment like online / cli.

You have a good chance to get different results if you use different graphviz versions. Within a same version I never have had problems of non-deterministics in dot graphs.

Another topic could be, if you use special utf-fonts, which could be rendered on different system different. For e.g. emoji-Flags rendering on windows vs. mac/unix.

Perhaps the wrapper / calling tools like doxygen / understand / pygraph / jgraph / gograph etc. pp. could be a source for different dot-files on different system.

I would state the dot-graph itself is very deterministic within the same version.



标签: graphviz dot