Skip to main content

No project description provided

Project description

Graphlot

Graphlot is a library that allows to simply visualize networks. It is built upon matplotlib, and plotly and exploits network layouts from networkx, igraph and graphviz.

For this reason the first step is to install graphviz by running

sudo apt install graphviz

Then we can install graphlot through pip

pip install graphlot

The library takes as input a networx graph and can plot the degree distribution and the network itself with different layouts.

To demonstrate it we will generate a random network with the function CreateNetworkFromRandomClasses(). This function takes as input a list and an integer. The list is of length n_classes and in which every value is the number of nodes of that specific classes. The integer is the number of random edges of the graph.

The function stores the information of the node belonging to a specific class in "Type" node attribute and node name in "name" node attribute.


import graphlot as gv
import random


random.seed(123127844)

grafo = gv.CreateNetworkFromRandomClasses([10,20,30,40,50],500)
gvV.plot_degree_distribution(grafo)

Degree Distribution


random.seed(123127844)
gv.visualize_network(grafo,mode = '2d',node_color_attribute='Type',legend = 'Type',cmap='viridis',annotate = 'Name')

Network Visualization

Moreover graphlot allows to plot networks in 3d in order to have a more flexible visualization.


random.seed(123127844)
gv.visualize_network(grafo,mode = '3d',node_color_attribute='Type',legend = 'Type',cmap='viridis',annotate = 'Name')

3d Visualization

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

graphlot-0.1.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file graphlot-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: graphlot-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for graphlot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7866780625d4f9ec4e10374ffd7d4a560e51df056e60fed442347a37b579a549
MD5 87b5571c3ea7ce55d34f80b218bee07c
BLAKE2b-256 f07916d63ac00ce8c51a9ca380963d27f786f17821fcb938fc277f3bd6f6943c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page