Sankey plot for matplotlib
Project description
matplotlib-sankey
Documentation | PyPI | Github repository | Codecov
Sankey plot for matplotlib
Installation
Install with pip:
pip install matplotlib-sankey
Install from source:
git clone https://github.com/harryhaller001/matplotlib-sankey
cd matplotlib-sankey
pip install .
Example
data = [
# (source index, target index, weight)
[(0, 2, 20), (0, 1, 10), (3, 4, 15), (3, 2, 10), (5, 1, 5), (5, 2, 50)],
[(2, 6, 40), (1, 6, 15), (2, 7, 40), (4, 6, 15)],
[(7, 8, 5), (7, 9, 5), (7, 10, 20), (7, 11, 10), (6, 11, 55), (6, 8, 15)],
]
fig, ax = plt.subplots(figsize=(10, 5))
fig.tight_layout()
sankey(
data=data,
cmap="tab20",
annotate_columns=True,
ax=ax,
spacing=0.03,
)
Development
python3.10 -m virtualenv venv
source venv/bin/activate
# Install dev dependencies
make install
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
matplotlib_sankey-0.3.0.tar.gz
(14.9 kB
view details)
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 matplotlib_sankey-0.3.0.tar.gz.
File metadata
- Download URL: matplotlib_sankey-0.3.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46f8b0baa3aecf1336552d04778400b4104e7eed8f722b1c61eb3eb6f5832445
|
|
| MD5 |
b70f4acb2edd066c6af38f8ded3ebac2
|
|
| BLAKE2b-256 |
45b44e27ca56a017f27a7f894da4cb12a2ee332faede52ea003980e73ad4391d
|
File details
Details for the file matplotlib_sankey-0.3.0-py3-none-any.whl.
File metadata
- Download URL: matplotlib_sankey-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd8b390eec4f7767fc672f53fca47984c17a82df739debbbab862d08ba49714f
|
|
| MD5 |
be0e550f7fad8aa2e12f862c969963a5
|
|
| BLAKE2b-256 |
00fb72e8368f1ff9fc8278dedcb66fce34979850060907f60bb5c5029780e5b3
|