plotlibs 0.3.0__py3-none-any.whl

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,228 @@
1
+ Metadata-Version: 2.4
2
+ Name: plotlibs
3
+ Version: 0.3.0
4
+ Summary: plotlibs — fast, beautiful, matplotlib-compatible plotting with DataFrames, SQL, EDA and ML/DL visuals (numpy + Pillow only)
5
+ Author: salim-studio
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/salim-studio/plotlibs
8
+ Project-URL: Repository, https://github.com/salim-studio/plotlibs
9
+ Project-URL: Issues, https://github.com/salim-studio/plotlibs/issues
10
+ Project-URL: Documentation, https://github.com/salim-studio/plotlibs#readme
11
+ Project-URL: Changelog, https://github.com/salim-studio/plotlibs/blob/main/CHANGELOG.md
12
+ Keywords: plotting,matplotlib,visualization,dataframe,sql,eda,machine-learning,deep-learning,pandas
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering :: Visualization
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Classifier: Topic :: Database
25
+ Requires-Python: >=3.9
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: numpy
29
+ Requires-Dist: pillow
30
+ Provides-Extra: data
31
+ Requires-Dist: pandas>=1.5; extra == "data"
32
+ Requires-Dist: pyarrow>=10; extra == "data"
33
+ Provides-Extra: db
34
+ Requires-Dist: sqlalchemy>=2.0; extra == "db"
35
+ Requires-Dist: duckdb>=0.8; extra == "db"
36
+ Provides-Extra: ml
37
+ Requires-Dist: scikit-learn>=1.0; extra == "ml"
38
+ Requires-Dist: pandas>=1.5; extra == "ml"
39
+ Provides-Extra: all
40
+ Requires-Dist: pandas>=1.5; extra == "all"
41
+ Requires-Dist: pyarrow>=10; extra == "all"
42
+ Requires-Dist: sqlalchemy>=2.0; extra == "all"
43
+ Requires-Dist: duckdb>=0.8; extra == "all"
44
+ Requires-Dist: scikit-learn>=1.0; extra == "all"
45
+ Requires-Dist: matplotlib>=3.5; extra == "all"
46
+ Provides-Extra: dev
47
+ Requires-Dist: matplotlib; extra == "dev"
48
+ Requires-Dist: pytest; extra == "dev"
49
+ Requires-Dist: pandas; extra == "dev"
50
+ Requires-Dist: scikit-learn; extra == "dev"
51
+ Dynamic: license-file
52
+
53
+ <p align="center">
54
+ <img src="assets/banner.svg" alt="plotlibs banner" width="100%"/>
55
+ </p>
56
+
57
+ <p align="center">
58
+ <img src="assets/logo.svg" alt="plotlibs logo" width="96"/>
59
+ </p>
60
+
61
+ <h1 align="center">plotlibs</h1>
62
+ <p align="center"><b>Fast, beautiful Python plotting for everyone.</b></p>
63
+
64
+ <p align="center">
65
+ <a href="https://github.com/salim-studio/plotlibs"><img src="https://img.shields.io/badge/github-salim--studio%2Fplotlibs-0F172A?logo=github" alt="GitHub"/></a>
66
+ <img src="https://img.shields.io/badge/version-0.3.0-4F46E5" alt="version"/>
67
+ <img src="https://img.shields.io/badge/speed-~4x_vs_matplotlib-06B6D4" alt="speed"/>
68
+ <img src="https://img.shields.io/badge/deps-numpy_%2B_pillow_only-A3E635" alt="deps"/>
69
+ <img src="https://img.shields.io/badge/license-MIT-FACC15" alt="license"/>
70
+ <img src="https://img.shields.io/badge/python-%3E%3D3.9-3776AB?logo=python&logoColor=white" alt="python"/>
71
+ </p>
72
+
73
+ > **Renamed:** `plotlib` → **`plotlibs`**.
74
+ > Old code keeps working via a shim (`import plotlib`), but please migrate to `import plotlibs`.
75
+ > New home: **https://github.com/salim-studio/plotlibs**
76
+
77
+ ```python
78
+ import plotlibs as pl
79
+
80
+ pl.plot([1, 2, 3], [1, 4, 9], label="x²")
81
+ pl.xlabel("x"); pl.ylabel("y"); pl.legend()
82
+ pl.savefig("out.png") # or pl.show()
83
+ ```
84
+
85
+ ## Why plotlibs?
86
+
87
+ | Audience | One-liner value |
88
+ |---|---|
89
+ | Developers | Matplotlib-compatible API, only `numpy + pillow`, ~4x faster on big data |
90
+ | Data analysts | `pl.load_csv` → `pl.quick_eda(df)` → `boxplot / kde / heatmap / countplot` |
91
+ | Databases | `pl.db_connect("sales.db")` + `pl.read_sql(...)` + `plot_from_sql(...)` (sqlite / SQLAlchemy / DuckDB) |
92
+ | Machine learning | `plot_confusion_matrix`, `plot_roc`, `plot_pr`, `feature_importance`, `residuals`, `elbow` |
93
+ | Deep learning | `plot_history`, `plot_images`, `plot_clusters_2d` |
94
+
95
+ ## Install
96
+
97
+ ```bash
98
+ pip install plotlibs # minimal: numpy + pillow
99
+ pip install "plotlibs[all]" # pandas + sqlalchemy + duckdb + sklearn + matplotlib
100
+ pip install -e ".[dev]" # contributors
101
+ ```
102
+
103
+ ## 30-second tour
104
+
105
+ ```python
106
+ import plotlibs as pl
107
+
108
+ # 1) EDA in one line
109
+ df = pl.load_csv("sales.csv")
110
+ print(pl.describe(df))
111
+ pl.quick_eda(df)
112
+
113
+ # 2) Stats plots (all matplotlib-style signatures)
114
+ pl.boxplot([[1, 2, 3], [2, 3, 4]], labels=["A", "B"])
115
+ pl.violinplot([[1, 2, 3], [2, 3, 4]])
116
+ pl.kde(df["sales"])
117
+ pl.heatmap([[1, 0.8], [0.8, 1]], annot=True)
118
+ pl.corr(df, annot=True)
119
+ pl.countplot(["Cairo", "Oran", "Cairo"])
120
+ pl.area([1, 2, 3], [1, 1, 1], [2, 2, 2], labels=["a", "b"])
121
+ pl.hist2d([1, 2, 2, 3], [1, 1, 2, 2])
122
+ pl.stem([1, 2, 3], [2, 1, 3])
123
+ ```
124
+
125
+ ```python
126
+ # 3) SQL -> plot
127
+ conn = pl.db_connect("sales.db") # or ":memory:", "sqlite:///x.db", "duckdb://shop.ddb"
128
+ pl.to_sql(df, "sales", conn)
129
+ print(pl.db.list_tables(conn))
130
+ df2 = pl.read_sql("SELECT region, SUM(amount) FROM sales GROUP BY region", conn)
131
+ pl.db.plot_from_sql("SELECT qty, amount FROM sales LIMIT 500", conn, kind="scatter")
132
+ ```
133
+
134
+ ```python
135
+ # 4) ML / DL
136
+ pl.plot_history({"loss": [0.9, 0.5, 0.3], "val_loss": [1.0, 0.6, 0.4]})
137
+ pl.plot_confusion_matrix(y_true, y_pred, normalize=True)
138
+ pl.plot_roc(y_true, y_score, label="xgb")
139
+ pl.plot_feature_importance(["age", "salary", "city"], [0.5, 0.3, 0.2])
140
+ pl.plot_images(mnist_images)
141
+ ```
142
+
143
+ ## Visual identity
144
+
145
+ Brand: **midnight ink `#0F172A` + indigo `#4F46E5` + cyan `#06B6D4`**, highlights lime `#A3E635` / amber `#FACC15`, background paper `#F8FAFC`. Logo: rounded-square gradient with a white line chart. See [`assets/`](assets/) and [`BRANDING.md`](BRANDING.md).
146
+
147
+ Signature theme:
148
+
149
+ ```python
150
+ import plotlibs as pl
151
+ pl.style.use("plotlibs") # light signature
152
+ pl.style.use("plotlibs-dark") # dark signature
153
+ print(pl.style.available())
154
+ ```
155
+
156
+ | Token | Hex | Use |
157
+ |---|---|---|
158
+ | primary | `#4F46E5` | lines, logo start, links |
159
+ | accent | `#06B6D4` | second series, banner end |
160
+ | ink | `#0F172A` | text, dark backgrounds |
161
+ | paper | `#F8FAFC` | page background |
162
+ | lime | `#A3E635` | highlight dots |
163
+ | amber | `#FACC15` | highlight dots |
164
+
165
+ ## Matplotlib compatibility
166
+
167
+ | matplotlib | plotlibs 0.3.0 |
168
+ |---|---|
169
+ | `plot / scatter / bar / hist / imshow / pie / fill_between / step / errorbar` | ✅ same signature |
170
+ | `boxplot / violinplot / hist2d / stem / stackplot` | ✅ |
171
+ | `xlabel / ylabel / title / legend / grid / xlim / ylim / savefig / show / subplots` | ✅ |
172
+ | `style.use / rcParams` | ✅ + `plotlibs`, `plotlibs-dark`, `seaborn`, `plotly`, `publication` |
173
+
174
+ ## Why faster?
175
+
176
+ 1. **Min-max decimation** — lines over 2000 points are bucketed (min+max preserved), `O(n)` in numpy.
177
+ 2. **Pillow rasterizer** — direct C-level drawing, no heavy layout engine.
178
+ 3. **Vectorized pipeline** — data→pixel in one pass, numpy ticks/limits.
179
+ 4. **No heavy objects** — artists are plain dicts, render is deferred.
180
+
181
+ Benchmark (`n=200k`, `benchmarks/bench.py`):
182
+
183
+ ```
184
+ plotlibs : ~370 ms/plot
185
+ matplotlib : ~1560 ms/plot
186
+ speedup : ~4.2x faster
187
+ ```
188
+
189
+ ## Project layout
190
+
191
+ ```
192
+ plotlibs/ # repo root (package name == repo name)
193
+ plotlibs/ # real package
194
+ __init__.py pyplot.py figure.py colors.py fast.py style.py
195
+ data.py db.py eda.py ml.py
196
+ backends/renderer.py
197
+ plotlib/ # deprecated shim (renamed alias)
198
+ assets/ # logo.svg, banner.svg
199
+ tests/ benchmarks/ examples/
200
+ ```
201
+
202
+ ## Migration from `plotlib`
203
+
204
+ ```diff
205
+ - import plotlib as pl
206
+ + import plotlibs as pl
207
+ ```
208
+
209
+ `import plotlib` still works in 0.3.x (emits `DeprecationWarning`) and will be removed in 1.0.
210
+
211
+ ## Roadmap
212
+
213
+ - [x] 0.3.0 — Rename to **plotlibs**, English docs, brand identity (this release)
214
+ - [ ] 0.4.0 — Interactive HTML export (`pl.save_html`), dashboards, RTL/Arabic labels
215
+ - [ ] 0.5.0 — Geo + time-series + sklearn/HF pipeline helpers
216
+ - Suggest ideas: open an issue with `[idea]` at https://github.com/salim-studio/plotlibs/issues
217
+
218
+ ## Contributing
219
+
220
+ ```bash
221
+ python -m pytest tests -q
222
+ python examples/demo.py
223
+ python examples/demo_fame.py
224
+ ```
225
+
226
+ ## License
227
+
228
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,18 @@
1
+ plotlib/__init__.py,sha256=EFAwfG_lumznKzYwePPX6wO0z9uAMo0TiaJtvrY0mDs,1243
2
+ plotlibs/__init__.py,sha256=ESCxFS_JPMOGWJqhrGcC1K7im7HrCWbcFzrIGf0ivaQ,2950
3
+ plotlibs/colors.py,sha256=bPSk__BeiaMNBLeuy1LD3FGBsIAMB00CBAYDIrLKLKE,3737
4
+ plotlibs/data.py,sha256=hXAw6TOK6UY8u5Qdc5eklUVJ2l7Ss5_oaaLtu2qTz4k,6866
5
+ plotlibs/db.py,sha256=N2z0FW6YViF5skmJ3PWFEm6xLcrodXzEfwpx6h6pCDI,7045
6
+ plotlibs/eda.py,sha256=ZV0cFKh4A6QQOHC-pfeORpUOYtJdNMpK8-BgUl1OuKE,5555
7
+ plotlibs/fast.py,sha256=yXXqoEo9wHsPFULkod2RArlCakQ1PAIFW5FQOB_TzDc,6723
8
+ plotlibs/figure.py,sha256=z-KqkYdNeekFn3kQ1-JfhtzFI33vELMoMKBEa8KZru4,24306
9
+ plotlibs/ml.py,sha256=cW3ak7sZnmz33tFx_5Q-GHBH6Mm_q-l5lAuomjZHIZ8,7686
10
+ plotlibs/pyplot.py,sha256=4BxtADF2PI1E20_K8AY_D_c0Afq85ITPtm7thZiWmbE,5245
11
+ plotlibs/style.py,sha256=MNzgU6Av3m0QOQI9LVbdmoo1uVFJ-APvLnUYzyLbKnQ,3238
12
+ plotlibs/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ plotlibs/backends/renderer.py,sha256=diwqODGaj8mRlJEtkMIfe5DeP14xK3tx4VbkwLG5qSs,24699
14
+ plotlibs-0.3.0.dist-info/licenses/LICENSE,sha256=hDYVKKPqNhSZ9rd347j-lmHJTI0g35WOPTYMp8SMh9Q,1069
15
+ plotlibs-0.3.0.dist-info/METADATA,sha256=ZFmdFiUpl0ZBiOfNQH2bD79CN5cxtYNasqY3GKnyqOc,8482
16
+ plotlibs-0.3.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
17
+ plotlibs-0.3.0.dist-info/top_level.txt,sha256=mBt47aND0JWkSkbP6-oSXSsyg3TL_GXhahCgx5Hfq7E,17
18
+ plotlibs-0.3.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 salim-studio
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,2 @@
1
+ plotlib
2
+ plotlibs