Site icon Python GUI

Draw Visually Stunning Networks In Your Python GUI App Using NetworkX Python Library

pexels artem beliaikin 5456314

Are you looking for visually-stunning tools to represent networks of knowledge, communication, social interactions, data organization, etc in your GUI App?

This post will get you to understand how to use the NetworkX Python Library using Python4Delphi (P4D) in the Delphi/C++ Builder application and perform some interesting Network Visualization tasks. 

NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

At a glance, NetworkX provides us with:

 

Demo: Draw Random Geometric Graph

This post will guide you on how to draw a Visually-Stunning Geometric Graph using Python’s NetworkX and then display it in the Delphi Windows GUI app.

First, open and run our Python GUI using project Demo1 from Python4Delphi with RAD Studio. Then insert the script into the lower Memo, click the Execute button, and get the result in the upper Memo. You can find the Demo1 source on GitHub. The behind the scene details of how Delphi manages to run your Python code in this amazing Python GUI can be found at this link.

Let’s perform a Random Geometric Graph demo of the NetworkX library. The following code is credited to NetworkX Developers (visit the source here):

[crayon-662d77f856144027110543/]

Let’s see the result in Python GUI:

 

Congratulations, now you have learned how to draw a Visually-Stunning Geometric Graph using Python’s NetworkX and then display it in the Delphi Windows GUI app.

Check out the NetworkX library for Python and use it in your projects: https://pypi.org/project/networkx/  and

Check out Python4Delphi which easily allows you to build Python GUIs for Windows using Delphi: https://github.com/pyscripter/python4delphi

Exit mobile version