Basic usage of GraphViz:
- Create GraphViz context
- Create graph
- Add content to graph (nodes, edges, attributes)
- Choose layout algorithm for the rendering
- Render graph
- Repeat 4. and 5. to rerender the same graph (maybe with another layout algorithm)
- Close graph if it isn't needed anymore (after this it could cause segfault if you try to use the graph again)
- Free GraphViz context (it can cause segfault too if you try to use the gvc again)