I need to draw the shapes from the following photo in a graph. I need to transpose the shapes in a graph in Python with nodes and edges. img1
Advertisement
Answer
One of the standard tools for defining graphs like this is the DOT language used by Graphviz.
You can create DOT graph descriptions and render them with the PyPI package graphviz, or with the pydot package.
Both appear to require that you have Graphviz installed if you want to render images.
Disclaimer: I’ve written plenty of Python and I’ve fiddled with DOT and Graphviz, but I haven’t used the above libraries.