Run dot -V
to check the version and if it was installed properly or not.
This is the dot syntax for creating a simple binary tree like a heap. You can see the output at the end of this article.
See official docs for more customization https://graphviz.org/doc/info/lang.html
Based on your data structure, add one prints that prints all nodes in the specific format of dot language.
From you main function you can call this utility function.
Every time I run make vis
, I will get the visualization in my desired format.
They support various output formats including PDF and png which are most commonly used. Read this for more info https://graphviz.org/docs/outputs/.