From 13e3e5b3b13c93f2cdcda9ab064f06dc4c10e074 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 09:31:19 +0000 Subject: [PATCH 1/3] feat(seaborn): implement contour-density --- .../implementations/seaborn.py | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 plots/contour-density/implementations/seaborn.py diff --git a/plots/contour-density/implementations/seaborn.py b/plots/contour-density/implementations/seaborn.py new file mode 100644 index 0000000000..a1a61bfe6b --- /dev/null +++ b/plots/contour-density/implementations/seaborn.py @@ -0,0 +1,49 @@ +"""pyplots.ai +contour-density: Density Contour Plot +Library: seaborn | Python 3.13 +Quality: pending | Created: 2025-12-30 +""" + +import matplotlib.pyplot as plt +import numpy as np +import seaborn as sns + + +# Data - bivariate normal distributions with two clusters +np.random.seed(42) + +# Main cluster +n1 = 300 +x1 = np.random.normal(loc=5, scale=1.5, size=n1) +y1 = np.random.normal(loc=5, scale=1.5, size=n1) + +# Secondary cluster +n2 = 150 +x2 = np.random.normal(loc=9, scale=1.0, size=n2) +y2 = np.random.normal(loc=8, scale=1.0, size=n2) + +# Combine clusters +x = np.concatenate([x1, x2]) +y = np.concatenate([y1, y2]) + +# Create figure +fig, ax = plt.subplots(figsize=(16, 9)) + +# Density contour plot using seaborn's kdeplot (filled) +sns.kdeplot(x=x, y=y, ax=ax, levels=10, fill=True, cmap="viridis", alpha=0.8) + +# Add contour lines for clarity +sns.kdeplot(x=x, y=y, ax=ax, levels=10, color="#306998", linewidths=1.5, alpha=0.7) + +# Scatter plot overlay for context (small, semi-transparent points) +ax.scatter(x, y, s=15, color="white", alpha=0.3, edgecolors="none") + +# Styling +ax.set_xlabel("X Variable (units)", fontsize=20) +ax.set_ylabel("Y Variable (units)", fontsize=20) +ax.set_title("contour-density · seaborn · pyplots.ai", fontsize=24) +ax.tick_params(axis="both", labelsize=16) +ax.grid(True, alpha=0.3, linestyle="--") + +plt.tight_layout() +plt.savefig("plot.png", dpi=300, bbox_inches="tight") From 7dc534dace9213f18e30cce8de59dd43ac725230 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 09:31:31 +0000 Subject: [PATCH 2/3] chore(seaborn): add metadata for contour-density --- plots/contour-density/metadata/seaborn.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plots/contour-density/metadata/seaborn.yaml diff --git a/plots/contour-density/metadata/seaborn.yaml b/plots/contour-density/metadata/seaborn.yaml new file mode 100644 index 0000000000..5a157412e8 --- /dev/null +++ b/plots/contour-density/metadata/seaborn.yaml @@ -0,0 +1,19 @@ +# Per-library metadata for seaborn implementation of contour-density +# Auto-generated by impl-generate.yml + +library: seaborn +specification_id: contour-density +created: '2025-12-30T09:31:30Z' +updated: '2025-12-30T09:31:30Z' +generated_by: claude-opus-4-5-20251101 +workflow_run: 20593350753 +issue: 0 +python_version: 3.13.11 +library_version: 0.13.2 +preview_url: https://storage.googleapis.com/pyplots-images/plots/contour-density/seaborn/plot.png +preview_thumb: https://storage.googleapis.com/pyplots-images/plots/contour-density/seaborn/plot_thumb.png +preview_html: null +quality_score: null +review: + strengths: [] + weaknesses: [] From 48ca6fe208651e9eec7c8338ffdccf62c3b57c91 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 09:41:02 +0000 Subject: [PATCH 3/3] chore(seaborn): update quality score 93 and review feedback for contour-density --- .../implementations/seaborn.py | 6 +++--- plots/contour-density/metadata/seaborn.yaml | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/plots/contour-density/implementations/seaborn.py b/plots/contour-density/implementations/seaborn.py index a1a61bfe6b..9ab7b460c7 100644 --- a/plots/contour-density/implementations/seaborn.py +++ b/plots/contour-density/implementations/seaborn.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai contour-density: Density Contour Plot -Library: seaborn | Python 3.13 -Quality: pending | Created: 2025-12-30 +Library: seaborn 0.13.2 | Python 3.13.11 +Quality: 93/100 | Created: 2025-12-30 """ import matplotlib.pyplot as plt diff --git a/plots/contour-density/metadata/seaborn.yaml b/plots/contour-density/metadata/seaborn.yaml index 5a157412e8..21bdb627d6 100644 --- a/plots/contour-density/metadata/seaborn.yaml +++ b/plots/contour-density/metadata/seaborn.yaml @@ -1,10 +1,7 @@ -# Per-library metadata for seaborn implementation of contour-density -# Auto-generated by impl-generate.yml - library: seaborn specification_id: contour-density created: '2025-12-30T09:31:30Z' -updated: '2025-12-30T09:31:30Z' +updated: '2025-12-30T09:41:02Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20593350753 issue: 0 @@ -13,7 +10,15 @@ library_version: 0.13.2 preview_url: https://storage.googleapis.com/pyplots-images/plots/contour-density/seaborn/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/contour-density/seaborn/plot_thumb.png preview_html: null -quality_score: null +quality_score: 93 review: - strengths: [] - weaknesses: [] + strengths: + - Excellent use of seaborn kdeplot for 2D kernel density estimation with both filled + and line contours + - Two-cluster data effectively demonstrates density visualization capabilities + - Viridis colormap provides excellent colorblind accessibility and visual appeal + - Scatter overlay adds context without cluttering the visualization + - Clean, well-structured code following KISS principles + weaknesses: + - No colorbar/legend to show the density scale mapping + - Generic axis labels (X Variable, Y Variable) rather than a real-world scenario