plotlibs
Fast, beautiful Python plotting for everyone.
Renamed:
plotlib→plotlibs. Old code keeps working via a shim (import plotlib), but please migrate toimport plotlibs. New home: https://github.com/salim-studio/plotlibs
import plotlibs as pl
pl.plot([1, 2, 3], [1, 4, 9], label="x²")
pl.xlabel("x"); pl.ylabel("y"); pl.legend()
pl.savefig("out.png") # or pl.show()
Why plotlibs?
| Audience | One-liner value |
|---|---|
| Developers | Matplotlib-compatible API, only numpy + pillow, ~4x faster on big data |
| Data analysts | pl.load_csv → pl.quick_eda(df) → boxplot / kde / heatmap / countplot |
| Databases | pl.db_connect("sales.db") + pl.read_sql(...) + plot_from_sql(...) (sqlite / SQLAlchemy / DuckDB) |
| Machine learning | plot_confusion_matrix, plot_roc, plot_pr, feature_importance, residuals, elbow |
| Deep learning | plot_history, plot_images, plot_clusters_2d |
Install
pip install plotlibs # minimal: numpy + pillow
pip install "plotlibs[all]" # pandas + sqlalchemy + duckdb + sklearn + matplotlib
pip install -e ".[dev]" # contributors
30-second tour
import plotlibs as pl
# 1) EDA in one line
df = pl.load_csv("sales.csv")
print(pl.describe(df))
pl.quick_eda(df)
# 2) Stats plots (all matplotlib-style signatures)
pl.boxplot([[1, 2, 3], [2, 3, 4]], labels=["A", "B"])
pl.violinplot([[1, 2, 3], [2, 3, 4]])
pl.kde(df["sales"])
pl.heatmap([[1, 0.8], [0.8, 1]], annot=True)
pl.corr(df, annot=True)
pl.countplot(["Cairo", "Oran", "Cairo"])
pl.area([1, 2, 3], [1, 1, 1], [2, 2, 2], labels=["a", "b"])
pl.hist2d([1, 2, 2, 3], [1, 1, 2, 2])
pl.stem([1, 2, 3], [2, 1, 3])
# 3) SQL -> plot
conn = pl.db_connect("sales.db") # or ":memory:", "sqlite:///x.db", "duckdb://shop.ddb"
pl.to_sql(df, "sales", conn)
print(pl.db.list_tables(conn))
df2 = pl.read_sql("SELECT region, SUM(amount) FROM sales GROUP BY region", conn)
pl.db.plot_from_sql("SELECT qty, amount FROM sales LIMIT 500", conn, kind="scatter")
# 4) ML / DL
pl.plot_history({"loss": [0.9, 0.5, 0.3], "val_loss": [1.0, 0.6, 0.4]})
pl.plot_confusion_matrix(y_true, y_pred, normalize=True)
pl.plot_roc(y_true, y_score, label="xgb")
pl.plot_feature_importance(["age", "salary", "city"], [0.5, 0.3, 0.2])
pl.plot_images(mnist_images)
Visual identity
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/ and BRANDING.md.
Signature theme:
import plotlibs as pl
pl.style.use("plotlibs") # light signature
pl.style.use("plotlibs-dark") # dark signature
print(pl.style.available())
| Token | Hex | Use |
|---|---|---|
| primary | #4F46E5 |
lines, logo start, links |
| accent | #06B6D4 |
second series, banner end |
| ink | #0F172A |
text, dark backgrounds |
| paper | #F8FAFC |
page background |
| lime | #A3E635 |
highlight dots |
| amber | #FACC15 |
highlight dots |
Matplotlib compatibility
| matplotlib | plotlibs 0.3.1 |
|---|---|
plot / scatter / bar / hist / imshow / pie / fill_between / step / errorbar |
✅ same signature |
boxplot / violinplot / hist2d / stem / stackplot |
✅ |
xlabel / ylabel / title / legend / grid / xlim / ylim / savefig / show / subplots |
✅ |
style.use / rcParams |
✅ + plotlibs, plotlibs-dark, seaborn, plotly, publication |
Why faster?
- Min-max decimation — lines over 2000 points are bucketed (min+max preserved),
O(n)in numpy. - Pillow rasterizer — direct C-level drawing, no heavy layout engine.
- Vectorized pipeline — data→pixel in one pass, numpy ticks/limits.
- No heavy objects — artists are plain dicts, render is deferred.
Benchmark (n=200k, benchmarks/bench.py):
plotlibs : ~370 ms/plot
matplotlib : ~1560 ms/plot
speedup : ~4.2x faster
Project layout
plotlibs/ # repo root (package name == repo name)
plotlibs/ # real package
__init__.py pyplot.py figure.py colors.py fast.py style.py
data.py db.py eda.py ml.py
backends/renderer.py
plotlib/ # deprecated shim (renamed alias)
assets/ # logo.svg, banner.svg
tests/ benchmarks/ examples/
Migration from plotlib
- import plotlib as pl
+ import plotlibs as pl
import plotlib still works in 0.3.x (emits DeprecationWarning) and will be removed in 1.0.
Roadmap
- 0.3.1 — Fix PyPI banner/logo images (absolute URLs), polish docs
- 0.3.0 — Rename to plotlibs, English docs, brand identity
- 0.4.0 — Interactive HTML export (
pl.save_html), dashboards, RTL/Arabic labels - 0.5.0 — Geo + time-series + sklearn/HF pipeline helpers
- Suggest ideas: open an issue with
[idea]at https://github.com/salim-studio/plotlibs/issues
Contributing
python -m pytest tests -q
python examples/demo.py
python examples/demo_fame.py
License
MIT — see LICENSE.
Metadata
Release files for plotlibs 0.3.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 | Provenance | |
|---|---|---|---|---|
| plotlibs-0.3.1.tar.gz | 37.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plotlibs-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.2 kB
Release files / plotlibs-0.3.1.tar.gz
| Download URL | plotlibs-0.3.1.tar.gz |
|---|---|
| Size | 37.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e9f27533a329002f11610a38f94a5216d21f4ba21ae5559354a18580e3c2678
|
|
BLAKE2b-256 checksum How to use checksums |
e1727962b0264e34bb790c4d76f923a627a124379aef467cbc1d29a33cd704d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / plotlibs-0.3.1-py3-none-any.whl
| Download URL | plotlibs-0.3.1-py3-none-any.whl |
|---|---|
| Size | 37.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1b6c0a702806d5ec2db04bd89497456153d1cf29df6fe4a56f9bb1ec875a36b
|
|
BLAKE2b-256 checksum How to use checksums |
5897fe559fa966edea4396f839d59e3e0ce75c871230dd91010029ae5c7cef2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for plotlibs 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.