From c2bc8553e7dd6a6e98936571f856dd36cc4d7348 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 10:38:08 +0000 Subject: [PATCH 1/3] feat(seaborn): implement scatter-categorical --- .../implementations/seaborn.py | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 plots/scatter-categorical/implementations/seaborn.py diff --git a/plots/scatter-categorical/implementations/seaborn.py b/plots/scatter-categorical/implementations/seaborn.py new file mode 100644 index 0000000000..1e4f4298d4 --- /dev/null +++ b/plots/scatter-categorical/implementations/seaborn.py @@ -0,0 +1,69 @@ +"""pyplots.ai +scatter-categorical: Categorical Scatter Plot +Library: seaborn | Python 3.13 +Quality: pending | Created: 2025-12-30 +""" + +import matplotlib.pyplot as plt +import numpy as np +import pandas as pd +import seaborn as sns + + +# Data - Iris-like flower measurements with species categories +np.random.seed(42) + +# Create data for three flower species with distinct patterns +n_per_group = 50 + +# Species A: smaller petals, tight cluster +species_a_x = np.random.normal(1.5, 0.3, n_per_group) +species_a_y = np.random.normal(0.3, 0.1, n_per_group) + +# Species B: medium petals, wider spread +species_b_x = np.random.normal(4.5, 0.8, n_per_group) +species_b_y = np.random.normal(1.4, 0.3, n_per_group) + +# Species C: larger petals, elongated cluster +species_c_x = np.random.normal(5.8, 0.6, n_per_group) +species_c_y = np.random.normal(2.1, 0.4, n_per_group) + +df = pd.DataFrame( + { + "Petal Length (cm)": np.concatenate([species_a_x, species_b_x, species_c_x]), + "Petal Width (cm)": np.concatenate([species_a_y, species_b_y, species_c_y]), + "Species": ["Setosa"] * n_per_group + ["Versicolor"] * n_per_group + ["Virginica"] * n_per_group, + } +) + +# Plot +fig, ax = plt.subplots(figsize=(16, 9)) + +# Custom colorblind-safe palette using Python colors first +custom_palette = ["#306998", "#FFD43B", "#6A9F58"] + +sns.scatterplot( + data=df, + x="Petal Length (cm)", + y="Petal Width (cm)", + hue="Species", + palette=custom_palette, + s=200, + alpha=0.7, + edgecolor="white", + linewidth=0.5, + ax=ax, +) + +# Styling +ax.set_title("scatter-categorical · seaborn · pyplots.ai", fontsize=24, fontweight="bold", pad=20) +ax.set_xlabel("Petal Length (cm)", fontsize=20) +ax.set_ylabel("Petal Width (cm)", fontsize=20) +ax.tick_params(axis="both", labelsize=16) +ax.grid(True, alpha=0.3, linestyle="--") + +# Legend styling +ax.legend(title="Species", fontsize=16, title_fontsize=18, loc="upper left", framealpha=0.9) + +plt.tight_layout() +plt.savefig("plot.png", dpi=300, bbox_inches="tight") From 9eacc14201bc7d5c4e84294e0abc47388b2db265 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 10:38:27 +0000 Subject: [PATCH 2/3] chore(seaborn): add metadata for scatter-categorical --- .../scatter-categorical/metadata/seaborn.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plots/scatter-categorical/metadata/seaborn.yaml diff --git a/plots/scatter-categorical/metadata/seaborn.yaml b/plots/scatter-categorical/metadata/seaborn.yaml new file mode 100644 index 0000000000..b31cf0a4e4 --- /dev/null +++ b/plots/scatter-categorical/metadata/seaborn.yaml @@ -0,0 +1,19 @@ +# Per-library metadata for seaborn implementation of scatter-categorical +# Auto-generated by impl-generate.yml + +library: seaborn +specification_id: scatter-categorical +created: '2025-12-30T10:38:26Z' +updated: '2025-12-30T10:38:26Z' +generated_by: claude-opus-4-5-20251101 +workflow_run: 20594554074 +issue: 0 +python_version: 3.13.11 +library_version: 0.13.2 +preview_url: https://storage.googleapis.com/pyplots-images/plots/scatter-categorical/seaborn/plot.png +preview_thumb: https://storage.googleapis.com/pyplots-images/plots/scatter-categorical/seaborn/plot_thumb.png +preview_html: null +quality_score: null +review: + strengths: [] + weaknesses: [] From d76ae6ec4b9e1a720741affc229ad5027f7fb763 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 10:46:52 +0000 Subject: [PATCH 3/3] chore(seaborn): update quality score 95 and review feedback for scatter-categorical --- .../implementations/seaborn.py | 6 ++--- .../scatter-categorical/metadata/seaborn.yaml | 24 +++++++++++++------ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/plots/scatter-categorical/implementations/seaborn.py b/plots/scatter-categorical/implementations/seaborn.py index 1e4f4298d4..c4aa67d667 100644 --- a/plots/scatter-categorical/implementations/seaborn.py +++ b/plots/scatter-categorical/implementations/seaborn.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai scatter-categorical: Categorical Scatter Plot -Library: seaborn | Python 3.13 -Quality: pending | Created: 2025-12-30 +Library: seaborn 0.13.2 | Python 3.13.11 +Quality: 95/100 | Created: 2025-12-30 """ import matplotlib.pyplot as plt diff --git a/plots/scatter-categorical/metadata/seaborn.yaml b/plots/scatter-categorical/metadata/seaborn.yaml index b31cf0a4e4..078c622efb 100644 --- a/plots/scatter-categorical/metadata/seaborn.yaml +++ b/plots/scatter-categorical/metadata/seaborn.yaml @@ -1,10 +1,7 @@ -# Per-library metadata for seaborn implementation of scatter-categorical -# Auto-generated by impl-generate.yml - library: seaborn specification_id: scatter-categorical created: '2025-12-30T10:38:26Z' -updated: '2025-12-30T10:38:26Z' +updated: '2025-12-30T10:46:52Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20594554074 issue: 0 @@ -13,7 +10,20 @@ library_version: 0.13.2 preview_url: https://storage.googleapis.com/pyplots-images/plots/scatter-categorical/seaborn/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/scatter-categorical/seaborn/plot_thumb.png preview_html: null -quality_score: null +quality_score: 95 review: - strengths: [] - weaknesses: [] + strengths: + - Excellent use of the Iris flower dataset context - classic, well-understood scientific + scenario + - Perfect text sizing with 24pt title, 20pt labels, 16pt ticks - all highly readable + - Custom colorblind-safe palette with good color contrast between categories + - Clean KISS code structure with proper seed for reproducibility + - Good marker sizing (s=200) and transparency (alpha=0.7) for 150 data points + - White edge borders on markers improve visibility and separation + - Three distinct clusters clearly demonstrate categorical grouping + weaknesses: + - Grid uses dashed linestyle which is slightly more distracting than solid with + low alpha + - Does not utilize seaborn's style parameter to vary marker shapes by category as + suggested in spec + - Could use seaborn's built-in 'colorblind' palette instead of custom colors