Seaborn Objects Recipes
📘 About
seaborn_objects_recipes is a Python package that extends the functionality of the Seaborn library, providing custom recipes for enhanced data visualization. This package includes below features to augment your Seaborn plots with additional capabilities.
[!TIP] For the full gallery and API, see the docs: API-Gallery Docs
📊 Combined Example: Rolling + LOWESS + Direct Line Labels
This example shows how multiple recipes can be layered to clarify noisy time-series data. We generate two synthetic series (sin and cos), apply a short-window rolling mean to smooth local fluctuations, overlay a LOWESS curve to reveal the long-term structure, and add LineLabel to place direct text labels at the right edge of each line.
This pattern is useful when you want:
- Local smoothing (Rolling) to reduce short-term noise
- Nonparametric smoothing (Lowess) to reveal global trends
- Direct labeling (LineLabel) to avoid legends and improve readability in multi-series plots
Together, these transforms produce a clean, interpretable visualization that emphasizes both local variation and overall structure — ideal for exploratory time-series analysis, sensor measurements, economic indicators, or any repeated noisy signal.
import seaborn.objects as so
import seaborn_objects_recipes as sor
import seaborn as sns
import numpy as np
import pandas as pd
# ---- Example data ----
np.random.seed(42)
x = np.linspace(0, 10, 200)
y1 = np.sin(x) + np.random.normal(scale=0.25, size=len(x))
y2 = np.cos(x) + np.random.normal(scale=0.25, size=len(x))
df = pd.DataFrame(
{
"x": np.tile(x, 2),
"y": np.concatenate([y1, y2]),
"series": np.repeat(["sin", "cos"], len(x)),
}
)
(
so.Plot(df, x="x", y="y", color="series", text="series")
# Rolling-smoothed line
.add(so.Line(), rolling := sor.Rolling(window=8, agg="mean"),legend=False,)
# LOWESS-smoothed line (overlaid)
.add(so.Line(), sor.Lowess(frac=0.25),legend=False,)
# Direct labels at the right edge of each series
.add(sor.LineLabel(offset=8), rolling)
.layout(size=(10, 4))
.label(
title="Smoothed Sin/Cos Time Series with Direct Labels",
x="x",
y="Smoothed value",
)
.show()
)
⚙️ Installation
To install seaborn_objects_recipes, run the following command:
pip install seaborn_objects_recipes
✉️ Contact
For questions or feedback regarding seaborn_objects_recipes, please contact Ofosu Osei.
🌟 Credits
- Special thanks to @nickeubank for the support and mentorship on this project
- Special thanks to @JesseFarebro for Rolling, LineLabel
- Special thanks to @tbpassin and @kcarnold for LOWESS Smoother
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
[!IMPORTANT] Quick Checklist:
- ✅ Distinct x-value count valid for LOWESS (frac ≥ 2/n)
- ✅ CI columns present (ymin, ymax) when bootstrapping is on
- ✅ alpha respected and bootstraps defaulted if unset
Metadata
Release files for seaborn_objects_recipes 0.2.4.post1
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 | |
|---|---|---|---|---|
| seaborn_objects_recipes-0.2.4.post1.tar.gz | 11.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seaborn_objects_recipes-0.2.4.post1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.2 kB
Release files / seaborn_objects_recipes-0.2.4.post1.tar.gz
| Download URL | seaborn_objects_recipes-0.2.4.post1.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9d1bc39fbe1f3860850056ce76c3681efe16e2e23980cf940f366d3c70bde7e
|
|
BLAKE2b-256 checksum How to use checksums |
0bd9995da12df85f3b50a610354d27086f0707b1005f94be918f95d5fb105280
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.14.2 Darwin/25.3.0
|
Release files / seaborn_objects_recipes-0.2.4.post1-py3-none-any.whl
| Download URL | seaborn_objects_recipes-0.2.4.post1-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ab2b2fbb52b3767507ba27b74133863f4853aefd885e7c7471769bce58bd084
|
|
BLAKE2b-256 checksum How to use checksums |
2f12ba3e5b59ea94deeda44f0ef5afc7089c1457c8f0978264a0ed33d42f1871
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.14.2 Darwin/25.3.0
|
Security for seaborn_objects_recipes 0.2.4.post1
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.