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.
Metadata
Release files for netbubbles 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| netbubbles-0.2.1.tar.gz | 25.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| netbubbles-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.4 kB
Release files / netbubbles-0.2.1.tar.gz
| Download URL | netbubbles-0.2.1.tar.gz |
|---|---|
| Size | 25.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad47a20c2344b3b508eba9cd4b608ed1954e7f344a69638ab5bf557977833a50
|
|
BLAKE2b-256 checksum How to use checksums |
becc08751d3237ef02f4881c79f7463ef1b93bbb82a00eac9284e07c99896350
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / netbubbles-0.2.1-py3-none-any.whl
| Download URL | netbubbles-0.2.1-py3-none-any.whl |
|---|---|
| Size | 25.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c40e612824fa08ec19dfd7d47f4609ded9a2eb571a8e30e1462b097e4e163f7a
|
|
BLAKE2b-256 checksum How to use checksums |
8b935a249bb5d740df2da6a03796c92736ba89e4c7e34ab408aaa24d6382cb44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|