matplotly 0.1.0__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.
Files changed (49) hide show
  1. matplotly-0.1.0/.github/workflows/publish.yml +44 -0
  2. matplotly-0.1.0/.github/workflows/tests.yml +28 -0
  3. matplotly-0.1.0/.gitignore +28 -0
  4. matplotly-0.1.0/.readthedocs.yaml +16 -0
  5. matplotly-0.1.0/CHANGELOG.md +14 -0
  6. matplotly-0.1.0/LICENSE +21 -0
  7. matplotly-0.1.0/PKG-INFO +120 -0
  8. matplotly-0.1.0/README.md +84 -0
  9. matplotly-0.1.0/demo_bar.ipynb +587 -0
  10. matplotly-0.1.0/demo_box.ipynb +1585 -0
  11. matplotly-0.1.0/demo_errorbar.ipynb +1041 -0
  12. matplotly-0.1.0/demo_heatmap.ipynb +849 -0
  13. matplotly-0.1.0/demo_hist.ipynb +835 -0
  14. matplotly-0.1.0/demo_plot.ipynb +526 -0
  15. matplotly-0.1.0/demo_scatter.ipynb +581 -0
  16. matplotly-0.1.0/docs/api.rst +4 -0
  17. matplotly-0.1.0/docs/changelog.rst +5 -0
  18. matplotly-0.1.0/docs/conf.py +25 -0
  19. matplotly-0.1.0/docs/examples/index.rst +22 -0
  20. matplotly-0.1.0/docs/index.rst +29 -0
  21. matplotly-0.1.0/docs/installation.rst +30 -0
  22. matplotly-0.1.0/docs/quickstart.rst +41 -0
  23. matplotly-0.1.0/docs/requirements.txt +4 -0
  24. matplotly-0.1.0/matplotly/__init__.py +124 -0
  25. matplotly-0.1.0/matplotly/_api.py +984 -0
  26. matplotly-0.1.0/matplotly/_code_gen.py +1793 -0
  27. matplotly-0.1.0/matplotly/_commands.py +109 -0
  28. matplotly-0.1.0/matplotly/_introspect.py +1197 -0
  29. matplotly-0.1.0/matplotly/_profiles.py +241 -0
  30. matplotly-0.1.0/matplotly/_renderer.py +79 -0
  31. matplotly-0.1.0/matplotly/_style_import.py +155 -0
  32. matplotly-0.1.0/matplotly/_types.py +31 -0
  33. matplotly-0.1.0/matplotly/panels/__init__.py +37 -0
  34. matplotly-0.1.0/matplotly/panels/_bar.py +788 -0
  35. matplotly-0.1.0/matplotly/panels/_base.py +38 -0
  36. matplotly-0.1.0/matplotly/panels/_color_utils.py +221 -0
  37. matplotly-0.1.0/matplotly/panels/_distribution.py +1605 -0
  38. matplotly-0.1.0/matplotly/panels/_errorbar.py +652 -0
  39. matplotly-0.1.0/matplotly/panels/_fill.py +90 -0
  40. matplotly-0.1.0/matplotly/panels/_global.py +1507 -0
  41. matplotly-0.1.0/matplotly/panels/_heatmap.py +898 -0
  42. matplotly-0.1.0/matplotly/panels/_histogram.py +938 -0
  43. matplotly-0.1.0/matplotly/panels/_line.py +709 -0
  44. matplotly-0.1.0/matplotly/panels/_marginal.py +944 -0
  45. matplotly-0.1.0/matplotly/panels/_scatter.py +428 -0
  46. matplotly-0.1.0/matplotly/panels/_subplot.py +846 -0
  47. matplotly-0.1.0/pyproject.toml +54 -0
  48. matplotly-0.1.0/requirements.txt +4 -0
  49. matplotly-0.1.0/tests/test_code_gen.py +2180 -0
@@ -0,0 +1,44 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.12"
18
+
19
+ - name: Build package
20
+ run: |
21
+ pip install build
22
+ python -m build
23
+
24
+ - name: Upload dist artifacts
25
+ uses: actions/upload-artifact@v4
26
+ with:
27
+ name: dist
28
+ path: dist/
29
+
30
+ publish:
31
+ needs: build
32
+ runs-on: ubuntu-latest
33
+ environment: pypi
34
+ permissions:
35
+ id-token: write
36
+ steps:
37
+ - name: Download dist artifacts
38
+ uses: actions/download-artifact@v4
39
+ with:
40
+ name: dist
41
+ path: dist/
42
+
43
+ - name: Publish to PyPI
44
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,28 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: pip install -e ".[dev]"
26
+
27
+ - name: Run tests
28
+ run: python -m pytest tests/ -v
@@ -0,0 +1,28 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ *.egg
8
+
9
+ # Virtual environment
10
+ .venv/
11
+
12
+ # Jupyter
13
+ .ipynb_checkpoints/
14
+
15
+ # Exported figures
16
+ *.pdf
17
+ *.png
18
+ *.svg
19
+ *.jpg
20
+
21
+ # OS
22
+ .DS_Store
23
+
24
+ # Docs
25
+ docs/_build/
26
+
27
+ # Tools
28
+ .ruff_cache/
@@ -0,0 +1,16 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.11"
7
+
8
+ sphinx:
9
+ configuration: docs/conf.py
10
+
11
+ python:
12
+ install:
13
+ - method: pip
14
+ path: .
15
+ extra_requirements:
16
+ - docs
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ ## [0.1.0] — 2025-06-01
4
+
5
+ ### Added
6
+
7
+ - Initial release of matplotly
8
+ - Jupyter-native interactive matplotlib figure editor
9
+ - Support for 10+ plot types: line, scatter, bar, histogram, box, violin, errorbar, heatmap, fill, marginal
10
+ - Three usage modes: direct figure, decorator, context manager
11
+ - Code generation for reproducible figures
12
+ - Undo / redo with full command history
13
+ - Style profiles: save and load reusable figure styles
14
+ - Subplot support with per-axes controls
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Peter Koo
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,120 @@
1
+ Metadata-Version: 2.4
2
+ Name: matplotly
3
+ Version: 0.1.0
4
+ Summary: Jupyter-native interactive matplotlib figure editor
5
+ Project-URL: Homepage, https://github.com/p-koo/matplotly
6
+ Project-URL: Documentation, https://matplotly.readthedocs.io
7
+ Project-URL: Bug Tracker, https://github.com/p-koo/matplotly/issues
8
+ Author: Peter Koo
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: interactive,jupyter,matplotlib,plotting,widgets
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Framework :: Jupyter
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering :: Visualization
22
+ Requires-Python: >=3.9
23
+ Requires-Dist: ipympl>=0.9.0
24
+ Requires-Dist: ipywidgets>=8.0.0
25
+ Requires-Dist: matplotlib>=3.8.0
26
+ Requires-Dist: numpy>=1.24.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=7.0; extra == 'dev'
29
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
30
+ Provides-Extra: docs
31
+ Requires-Dist: myst-parser>=3.0; extra == 'docs'
32
+ Requires-Dist: nbsphinx>=0.9; extra == 'docs'
33
+ Requires-Dist: sphinx-rtd-theme>=2.0; extra == 'docs'
34
+ Requires-Dist: sphinx>=7.0; extra == 'docs'
35
+ Description-Content-Type: text/markdown
36
+
37
+ # matplotly
38
+
39
+ [![PyPI version](https://img.shields.io/pypi/v/matplotly.svg)](https://pypi.org/project/matplotly/)
40
+ [![Python versions](https://img.shields.io/pypi/pyversions/matplotly.svg)](https://pypi.org/project/matplotly/)
41
+ [![License](https://img.shields.io/pypi/l/matplotly.svg)](https://github.com/p-koo/matplotly/blob/main/LICENSE)
42
+ [![Docs](https://readthedocs.org/projects/matplotly/badge/?version=latest)](https://matplotly.readthedocs.io)
43
+
44
+ **Jupyter-native interactive matplotlib figure editor.**
45
+
46
+ Edit any matplotlib figure interactively — styles, colors, labels, legends — then export
47
+ reproducible Python code. No separate GUI; everything runs inline in your notebook.
48
+
49
+ ## Features
50
+
51
+ - **10+ plot types**: line, scatter, bar, histogram, box, violin, errorbar, heatmap, fill, marginal
52
+ - **Code generation**: export a standalone Python script that recreates your styled figure
53
+ - **Undo / redo**: full command history with keyboard shortcuts
54
+ - **Style profiles**: save and load reusable figure styles
55
+ - **Subplot support**: edit multi-panel figures with per-axes controls
56
+
57
+ ## Installation
58
+
59
+ ```bash
60
+ pip install matplotly
61
+ ```
62
+
63
+ Requires a Jupyter environment with the `ipympl` backend enabled:
64
+
65
+ ```python
66
+ %matplotlib widget
67
+ ```
68
+
69
+ ## Quick Start
70
+
71
+ ```python
72
+ %matplotlib widget
73
+ import matplotlib.pyplot as plt
74
+ from matplotly import matplotly
75
+
76
+ # 1. Pass a figure directly
77
+ fig, ax = plt.subplots()
78
+ ax.plot([1, 2, 3], [1, 4, 9])
79
+ matplotly(fig)
80
+
81
+ # 2. Decorator mode
82
+ @matplotly
83
+ def my_plot():
84
+ plt.plot([1, 2, 3], [1, 4, 9])
85
+
86
+ my_plot()
87
+
88
+ # 3. Context manager
89
+ with matplotly() as pb:
90
+ fig, ax = plt.subplots()
91
+ ax.plot([1, 2, 3], [1, 4, 9])
92
+ ```
93
+
94
+ ## Supported Plot Types
95
+
96
+ | Type | Description |
97
+ |------|-------------|
98
+ | Line | `ax.plot()` |
99
+ | Scatter | `ax.scatter()` |
100
+ | Bar | `ax.bar()` / `ax.barh()` |
101
+ | Histogram | `ax.hist()` |
102
+ | Box | `ax.boxplot()` |
103
+ | Violin | `ax.violinplot()` |
104
+ | Errorbar | `ax.errorbar()` |
105
+ | Heatmap | `ax.imshow()` / `ax.pcolormesh()` |
106
+ | Fill | `ax.fill_between()` / `ax.fill_betweenx()` |
107
+ | Marginal | Joint + marginal distribution plots |
108
+
109
+ ## Documentation
110
+
111
+ Full documentation is available at [matplotly.readthedocs.io](https://matplotly.readthedocs.io).
112
+
113
+ ## Contributing
114
+
115
+ Contributions are welcome! Please open an issue or pull request on
116
+ [GitHub](https://github.com/p-koo/matplotly).
117
+
118
+ ## License
119
+
120
+ MIT — see [LICENSE](LICENSE) for details.
@@ -0,0 +1,84 @@
1
+ # matplotly
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/matplotly.svg)](https://pypi.org/project/matplotly/)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/matplotly.svg)](https://pypi.org/project/matplotly/)
5
+ [![License](https://img.shields.io/pypi/l/matplotly.svg)](https://github.com/p-koo/matplotly/blob/main/LICENSE)
6
+ [![Docs](https://readthedocs.org/projects/matplotly/badge/?version=latest)](https://matplotly.readthedocs.io)
7
+
8
+ **Jupyter-native interactive matplotlib figure editor.**
9
+
10
+ Edit any matplotlib figure interactively — styles, colors, labels, legends — then export
11
+ reproducible Python code. No separate GUI; everything runs inline in your notebook.
12
+
13
+ ## Features
14
+
15
+ - **10+ plot types**: line, scatter, bar, histogram, box, violin, errorbar, heatmap, fill, marginal
16
+ - **Code generation**: export a standalone Python script that recreates your styled figure
17
+ - **Undo / redo**: full command history with keyboard shortcuts
18
+ - **Style profiles**: save and load reusable figure styles
19
+ - **Subplot support**: edit multi-panel figures with per-axes controls
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ pip install matplotly
25
+ ```
26
+
27
+ Requires a Jupyter environment with the `ipympl` backend enabled:
28
+
29
+ ```python
30
+ %matplotlib widget
31
+ ```
32
+
33
+ ## Quick Start
34
+
35
+ ```python
36
+ %matplotlib widget
37
+ import matplotlib.pyplot as plt
38
+ from matplotly import matplotly
39
+
40
+ # 1. Pass a figure directly
41
+ fig, ax = plt.subplots()
42
+ ax.plot([1, 2, 3], [1, 4, 9])
43
+ matplotly(fig)
44
+
45
+ # 2. Decorator mode
46
+ @matplotly
47
+ def my_plot():
48
+ plt.plot([1, 2, 3], [1, 4, 9])
49
+
50
+ my_plot()
51
+
52
+ # 3. Context manager
53
+ with matplotly() as pb:
54
+ fig, ax = plt.subplots()
55
+ ax.plot([1, 2, 3], [1, 4, 9])
56
+ ```
57
+
58
+ ## Supported Plot Types
59
+
60
+ | Type | Description |
61
+ |------|-------------|
62
+ | Line | `ax.plot()` |
63
+ | Scatter | `ax.scatter()` |
64
+ | Bar | `ax.bar()` / `ax.barh()` |
65
+ | Histogram | `ax.hist()` |
66
+ | Box | `ax.boxplot()` |
67
+ | Violin | `ax.violinplot()` |
68
+ | Errorbar | `ax.errorbar()` |
69
+ | Heatmap | `ax.imshow()` / `ax.pcolormesh()` |
70
+ | Fill | `ax.fill_between()` / `ax.fill_betweenx()` |
71
+ | Marginal | Joint + marginal distribution plots |
72
+
73
+ ## Documentation
74
+
75
+ Full documentation is available at [matplotly.readthedocs.io](https://matplotly.readthedocs.io).
76
+
77
+ ## Contributing
78
+
79
+ Contributions are welcome! Please open an issue or pull request on
80
+ [GitHub](https://github.com/p-koo/matplotly).
81
+
82
+ ## License
83
+
84
+ MIT — see [LICENSE](LICENSE) for details.