matplotlib-sankey 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 4
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [{*.{yml,yaml,toml},.cruft.json}]
12
+ indent_size = 2
13
+
14
+ [Makefile]
15
+ indent_style = tab
@@ -0,0 +1,164 @@
1
+ /docs/coverage_report
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ # .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # poetry
100
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
102
+ # commonly ignored for libraries.
103
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104
+ #poetry.lock
105
+
106
+ # pdm
107
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108
+ #pdm.lock
109
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110
+ # in version control.
111
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
112
+ .pdm.toml
113
+ .pdm-python
114
+ .pdm-build/
115
+
116
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117
+ __pypackages__/
118
+
119
+ # Celery stuff
120
+ celerybeat-schedule
121
+ celerybeat.pid
122
+
123
+ # SageMath parsed files
124
+ *.sage.py
125
+
126
+ # Environments
127
+ .env
128
+ .venv
129
+ env/
130
+ venv/
131
+ ENV/
132
+ env.bak/
133
+ venv.bak/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # mypy
146
+ .mypy_cache/
147
+ .dmypy.json
148
+ dmypy.json
149
+
150
+ # Pyre type checker
151
+ .pyre/
152
+
153
+ # pytype static type analyzer
154
+ .pytype/
155
+
156
+ # Cython debug symbols
157
+ cython_debug/
158
+
159
+ # PyCharm
160
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
161
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
162
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
163
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
164
+ #.idea/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 harryhaller001
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: matplotlib-sankey
3
+ Version: 0.2.1
4
+ Summary: Sankey plot for matplotlib
5
+ Author: harryhaller001
6
+ Maintainer-email: harryhaller001 <harryhaller001@gmail.com>
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Framework :: Matplotlib
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Natural Language :: English
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Typing :: Typed
20
+ License-File: LICENSE
21
+ Requires-Dist: matplotlib
22
+ Requires-Dist: numpy
23
+ Requires-Dist: ipykernel ; extra == "docs"
24
+ Requires-Dist: ipython ; extra == "docs"
25
+ Requires-Dist: ipywidgets ; extra == "docs"
26
+ Requires-Dist: myst-parser ; extra == "docs"
27
+ Requires-Dist: nbsphinx ; extra == "docs"
28
+ Requires-Dist: networkx[default] ; extra == "docs"
29
+ Requires-Dist: sphinx>=4 ; extra == "docs"
30
+ Requires-Dist: sphinx-autoapi ; extra == "docs"
31
+ Requires-Dist: sphinx-autodoc-typehints ; extra == "docs"
32
+ Requires-Dist: sphinx-book-theme>=1 ; extra == "docs"
33
+ Requires-Dist: coverage ; extra == "test"
34
+ Requires-Dist: flit ; extra == "test"
35
+ Requires-Dist: mypy ; extra == "test"
36
+ Requires-Dist: pre-commit ; extra == "test"
37
+ Requires-Dist: pytest ; extra == "test"
38
+ Requires-Dist: ruff ; extra == "test"
39
+ Requires-Dist: setuptools ; extra == "test"
40
+ Requires-Dist: twine>=4.0.2 ; extra == "test"
41
+ Project-URL: Documentation, https://github.com/harryhaller001/matplotlib-sankey
42
+ Project-URL: Homepage, https://github.com/harryhaller001/matplotlib-sankey
43
+ Project-URL: Source, https://github.com/harryhaller001/matplotlib-sankey
44
+ Provides-Extra: docs
45
+ Provides-Extra: test
46
+
47
+ # matplotlib-sankey
48
+
49
+ Sankey plot for matplotlib
50
+
51
+ ### Installation
52
+
53
+ Install with pip:
54
+
55
+ `pip install matplotlib-sankey`
56
+
57
+ Install from source:
58
+
59
+ ```bash
60
+ git clone https://github.com/harryhaller001/matplotlib-sankey
61
+ cd matplotlib-sankey
62
+ pip install .
63
+ ```
64
+
65
+
66
+ ### Example
67
+
68
+ ```python
69
+ data = [
70
+ # (source index, target index, weight)
71
+ [(0, 2, 20), (0, 1, 10), (3, 4, 15), (3, 2, 10), (5, 1, 5), (5, 2, 50)],
72
+ [(2, 6, 40), (1, 6, 15), (2, 7, 40), (4, 6, 15)],
73
+ [(7, 8, 5), (7, 9, 5), (7, 10, 20), (7, 11, 10), (6, 11, 55), (6, 8, 15)],
74
+ ]
75
+
76
+ fig, ax = plt.subplots(figsize=(10, 5))
77
+ fig.tight_layout()
78
+ sankey(
79
+ data=data,
80
+ cmap="tab20",
81
+ annotate_columns=True,
82
+ ax=ax,
83
+ spacing=0.03,
84
+ )
85
+ ```
86
+
87
+ ![Sankey plot example](./docs/source/_static/images/example_sankey_plot.jpg)
88
+
89
+
90
+
91
+ ### Development
92
+
93
+ ```bash
94
+ python3.10 -m virtualenv venv
95
+ source venv/bin/activate
96
+
97
+ # Install dev dependencies
98
+ make install
99
+ ```
100
+
@@ -0,0 +1,53 @@
1
+ # matplotlib-sankey
2
+
3
+ Sankey plot for matplotlib
4
+
5
+ ### Installation
6
+
7
+ Install with pip:
8
+
9
+ `pip install matplotlib-sankey`
10
+
11
+ Install from source:
12
+
13
+ ```bash
14
+ git clone https://github.com/harryhaller001/matplotlib-sankey
15
+ cd matplotlib-sankey
16
+ pip install .
17
+ ```
18
+
19
+
20
+ ### Example
21
+
22
+ ```python
23
+ data = [
24
+ # (source index, target index, weight)
25
+ [(0, 2, 20), (0, 1, 10), (3, 4, 15), (3, 2, 10), (5, 1, 5), (5, 2, 50)],
26
+ [(2, 6, 40), (1, 6, 15), (2, 7, 40), (4, 6, 15)],
27
+ [(7, 8, 5), (7, 9, 5), (7, 10, 20), (7, 11, 10), (6, 11, 55), (6, 8, 15)],
28
+ ]
29
+
30
+ fig, ax = plt.subplots(figsize=(10, 5))
31
+ fig.tight_layout()
32
+ sankey(
33
+ data=data,
34
+ cmap="tab20",
35
+ annotate_columns=True,
36
+ ax=ax,
37
+ spacing=0.03,
38
+ )
39
+ ```
40
+
41
+ ![Sankey plot example](./docs/source/_static/images/example_sankey_plot.jpg)
42
+
43
+
44
+
45
+ ### Development
46
+
47
+ ```bash
48
+ python3.10 -m virtualenv venv
49
+ source venv/bin/activate
50
+
51
+ # Install dev dependencies
52
+ make install
53
+ ```