AndiToma112
AndiToma112

Reputation: 21

How to draw shapes in a graph using nodes and edges in python?

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

img2

Upvotes: 0

Views: 139

Answers (1)

NateEag
NateEag

Reputation: 597

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.

Upvotes: 2

Related Questions