I need to create schematics similar to the ones that can be created with draw.io or other similar software like dia, or MS Visio. However, I need to do that with a scripting language, preferably python.

Is there any python library to do that? It would be great if it also has support for latex formulas. Thanks in advance!


2 Answers 2


You could use the diagrams library for writing. For the latex notation, you could use matplotlib.

If you need something more abstract or generic, networkx might be what you need. A simpler approach might be to use the graphviz python library


N2G is a python library that can be used to create draw.io or yEd diagrams https://github.com/dmulyalin/N2G

  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Nov 26, 2022 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.