Directed bubble-graph visualisation with curved arrows
Project description
netbubbles
Directed bubble-graph visualisation with curved arrows
netbubbles is a Python library for creating publication-quality bubble-graph visualisations of directed weighted networks. It uses circular nodes with curved arrow edges, supports multiple layout algorithms, and comes with domain-specific presets for biology, bibliometrics, software engineering, and more.
Features
- Multiple layouts - circular, focus (hub-and-spoke), bilayer (concentric rings), grid, manual
- Curved arrow edges with automatic angle spreading and arrowheads
- Weighted edges with configurable colour/size tiers
- Self-loop support for recursive relationships
- Domain presets - LIANA cell-cell communication, citation networks, software dependencies, data pipelines, web graphs, social networks
- Fully customizable - colours, fonts, shadows, highlights, background, edge styles
- Multi-panel figures - compose multiple graphs in a single figure
- Legend support for node colour keys
- Graph operations - subgraph extraction, edge filtering, aggregation, node merging
- Built on matplotlib - integrates with any matplotlib workflow
Installation
pip install netbubbles
For preset modules that use pandas:
pip install netbubbles[presets]
Quick Start
import netbubbles as nb
g = nb.BubbleGraph.from_weighted_edges(
{("A", "B"): 10, ("B", "C"): 7, ("C", "A"): 5, ("B", "A"): 3},
colors={"A": "#E41A1C", "B": "#377EB8", "C": "#4DAF4A"},
)
ax = nb.draw(g, title="My Network")
ax.figure.savefig("network.png", dpi=150, bbox_inches="tight")
For layouts, presets, customization and graph operations see docs/usage.md.
Gallery
| Circular Layout | Focus Layout | Bilayer Layout |
| Custom Style | Citation Network | Social Network |
Examples
15 runnable scripts covering all layouts and presets - see docs/examples.md for the full list with previews.
cd examples && python generate_all.py
Citation
If you use netbubbles in a publication, please cite it:
APA:
dam2452. (2026). netbubbles: Directed bubble-graph visualisation with curved arrows (Version 0.2.0). https://github.com/dam2452/netbubbles
BibTeX:
@software{netbubbles2026,
title = {netbubbles: Directed bubble-graph visualisation with curved arrows},
author = {dam2452},
year = {2026},
version = {0.2.0},
url = {https://github.com/dam2452/netbubbles}
}
Contributing
Contributions are welcome! Here's how you can help:
- Bug reports - Open an issue with a minimal reproducible example
- Feature requests - Open an issue describing the use case
- Code contributions - Fork, create a feature branch, and open a pull request
- New presets - Add a new submodule under
netbubbles/presets/with ato_graph()function and an example
Development setup
git clone https://github.com/dam2452/netbubbles.git
cd netbubbles
pip install -e ".[dev]"
pytest tests/
License
This project is licensed under CC BY-NC-SA 4.0 - Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.
- Use it freely - for research, education, personal projects
- Cite the author - attribution required in publications and derivative works
- No commercial use - you may not sell or monetize this software
- Share changes back - modifications must be distributed under the same license (pull requests welcome!)
See LICENSE for full details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netbubbles-0.2.0.tar.gz.
File metadata
- Download URL: netbubbles-0.2.0.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
808a93ed42bd927ddcbce12b345be875966d59f119f0e20dcd91770b9ef51389
|
|
| MD5 |
8610e39b7c5f7c18c8012abb764ffecc
|
|
| BLAKE2b-256 |
b2d37ea801b479af3ccff57790c63f227a493781074dd86d1f98641be67ad614
|
File details
Details for the file netbubbles-0.2.0-py3-none-any.whl.
File metadata
- Download URL: netbubbles-0.2.0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d09e38bd5331b3d40fb55288df4ac351f714c9b1e15f950aebbcb40242bb2ba
|
|
| MD5 |
457f1033e32208909fb4eaeeb876024a
|
|
| BLAKE2b-256 |
de68094155b2d3ee0279982cbc19465f3b637dd23c8e9928c8f880e7a2849bd8
|