Name | graphlot JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-07-05 12:26:58 |
maintainer | None |
docs_url | None |
author | Francesco Gualdi |
requires_python | None |
license | GPL |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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([20,20,30], 150)
gv.plot_degree_distribution(grafo)
```

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

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',node_annotation = 'Name')
```
[3D Network](https://htmlpreview.github.io/?https://github.com/freh-g/graphlot/blob/main/images/network.html)
Raw data
{
"_id": null,
"home_page": null,
"name": "graphlot",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Francesco Gualdi",
"author_email": null,
"download_url": null,
"platform": null,
"description": "# Graphlot\n\n\nGraphlot 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.\n\nFor this reason the first step is to install graphviz by running\n\n```\nsudo apt install graphviz\n\n```\nThen we can install graphlot through pip\n\n```\npip install graphlot\n\n```\n\n\nThe library takes as input a networx graph and can plot the degree distribution and the network itself with different layouts.\n\nTo 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.\n\nThe function stores the information of the node belonging to a specific class in \"Type\" node attribute and node name in \"name\" node attribute.\n\n```\n\nimport graphlot as gv\nimport random\n\n\nrandom.seed(123127844)\n\ngrafo = gv.CreateNetworkFromRandomClasses([20,20,30], 150)\ngv.plot_degree_distribution(grafo)\n\n```\n\n\n\n\n\n```\n\nrandom.seed(123127844)\ngv.visualize_network(grafo,mode = '2d',node_color_attribute='Type',legend = 'Type',cmap='viridis',node_annotation = 'Name')\n\n```\n\n\n\n\n\n\nMoreover graphlot allows to plot networks in 3d in order to have a more flexible visualization.\n\n\n```\n\nrandom.seed(123127844)\ngv.visualize_network(grafo,mode = '3d',node_color_attribute='Type',legend = 'Type',cmap='viridis',node_annotation = 'Name')\n\n```\n\n\n[3D Network](https://htmlpreview.github.io/?https://github.com/freh-g/graphlot/blob/main/images/network.html)\n\n\n",
"bugtrack_url": null,
"license": "GPL",
"summary": null,
"version": "0.3.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "205eca6cd0a26824f1d18f26930d018caed55e588f32c00f561b36b31dac6e61",
"md5": "96ac82a931aeb4b28a20ef9a1d5c5b2a",
"sha256": "395f7f13f04bbb8069109df4b4017b7c4c11219c042b898859e1107e89ceec9e"
},
"downloads": -1,
"filename": "graphlot-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "96ac82a931aeb4b28a20ef9a1d5c5b2a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 18152,
"upload_time": "2024-07-05T12:26:58",
"upload_time_iso_8601": "2024-07-05T12:26:58.581328Z",
"url": "https://files.pythonhosted.org/packages/20/5e/ca6cd0a26824f1d18f26930d018caed55e588f32c00f561b36b31dac6e61/graphlot-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-05 12:26:58",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "graphlot"
}