From 576cdb17bfe4d7cd7942077ca0f93e9375207553 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Dec 2025 19:21:04 +0000 Subject: [PATCH 1/3] feat(seaborn): implement bar-error --- plots/bar-error/implementations/seaborn.py | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 plots/bar-error/implementations/seaborn.py diff --git a/plots/bar-error/implementations/seaborn.py b/plots/bar-error/implementations/seaborn.py new file mode 100644 index 0000000000..20533ea86a --- /dev/null +++ b/plots/bar-error/implementations/seaborn.py @@ -0,0 +1,83 @@ +"""pyplots.ai +bar-error: Bar Chart with Error Bars +Library: seaborn | Python 3.13 +Quality: pending | Created: 2025-12-27 +""" + +import matplotlib.pyplot as plt +import numpy as np +import pandas as pd +import seaborn as sns + + +# Data - A/B test results with confidence intervals +np.random.seed(42) + +categories = ["Control", "Variant A", "Variant B", "Variant C", "Variant D", "Variant E"] +# Conversion rates (percentage) +values = [4.2, 5.1, 4.8, 6.3, 5.5, 4.0] +# 95% CI error margins (asymmetric for realistic percentage data) +errors_lower = [0.3, 0.4, 0.35, 0.5, 0.45, 0.25] +errors_upper = [0.35, 0.45, 0.4, 0.55, 0.5, 0.3] + +df = pd.DataFrame( + {"Category": categories, "Conversion Rate (%)": values, "Error Lower": errors_lower, "Error Upper": errors_upper} +) + +# Create figure +fig, ax = plt.subplots(figsize=(16, 9)) + +# Create bar plot using seaborn +colors = ["#306998", "#FFD43B", "#306998", "#FFD43B", "#306998", "#FFD43B"] +sns.barplot( + data=df, + x="Category", + y="Conversion Rate (%)", + hue="Category", + palette=colors, + legend=False, + ax=ax, + edgecolor="black", + linewidth=1.5, + width=0.7, +) + +# Add error bars with caps +x_positions = np.arange(len(categories)) +ax.errorbar( + x_positions, + values, + yerr=[errors_lower, errors_upper], + fmt="none", + ecolor="black", + elinewidth=2.5, + capsize=12, + capthick=2.5, +) + +# Styling for large canvas (4800x2700 px at dpi=300) +ax.set_xlabel("Test Group", fontsize=20) +ax.set_ylabel("Conversion Rate (%)", fontsize=20) +ax.set_title("bar-error · seaborn · pyplots.ai", fontsize=24, fontweight="bold") +ax.tick_params(axis="both", labelsize=16) + +# Add annotation explaining error bars +ax.annotate( + "Error bars: 95% CI", + xy=(0.98, 0.95), + xycoords="axes fraction", + fontsize=14, + ha="right", + va="top", + bbox={"boxstyle": "round,pad=0.3", "facecolor": "white", "edgecolor": "gray", "alpha": 0.8}, +) + +# Subtle grid +ax.yaxis.grid(True, alpha=0.3, linestyle="--") +ax.set_axisbelow(True) + +# Set y-axis to start from 0 for proper bar comparison +ax.set_ylim(0, max(values) * 1.25) + +plt.tight_layout() +plt.savefig("plot.png", dpi=300, bbox_inches="tight") From 7e856aad2f04dfa921c7d8437619f7abae22c88d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Dec 2025 19:21:23 +0000 Subject: [PATCH 2/3] chore(seaborn): add metadata for bar-error --- plots/bar-error/metadata/seaborn.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plots/bar-error/metadata/seaborn.yaml diff --git a/plots/bar-error/metadata/seaborn.yaml b/plots/bar-error/metadata/seaborn.yaml new file mode 100644 index 0000000000..02abc3a47e --- /dev/null +++ b/plots/bar-error/metadata/seaborn.yaml @@ -0,0 +1,19 @@ +# Per-library metadata for seaborn implementation of bar-error +# Auto-generated by impl-generate.yml + +library: seaborn +specification_id: bar-error +created: '2025-12-27T19:21:22Z' +updated: '2025-12-27T19:21:22Z' +generated_by: claude-opus-4-5-20251101 +workflow_run: 20543280392 +issue: 0 +python_version: 3.13.11 +library_version: 0.13.2 +preview_url: https://storage.googleapis.com/pyplots-images/plots/bar-error/seaborn/plot.png +preview_thumb: https://storage.googleapis.com/pyplots-images/plots/bar-error/seaborn/plot_thumb.png +preview_html: null +quality_score: null +review: + strengths: [] + weaknesses: [] From bb2ed85c8c041f87582efd754a2d4d5eb9cb0fc4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Dec 2025 19:29:06 +0000 Subject: [PATCH 3/3] chore(seaborn): update quality score 91 and review feedback for bar-error --- plots/bar-error/implementations/seaborn.py | 6 +++--- plots/bar-error/metadata/seaborn.yaml | 24 +++++++++++++++------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/plots/bar-error/implementations/seaborn.py b/plots/bar-error/implementations/seaborn.py index 20533ea86a..bd89657add 100644 --- a/plots/bar-error/implementations/seaborn.py +++ b/plots/bar-error/implementations/seaborn.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai bar-error: Bar Chart with Error Bars -Library: seaborn | Python 3.13 -Quality: pending | Created: 2025-12-27 +Library: seaborn 0.13.2 | Python 3.13.11 +Quality: 91/100 | Created: 2025-12-27 """ import matplotlib.pyplot as plt diff --git a/plots/bar-error/metadata/seaborn.yaml b/plots/bar-error/metadata/seaborn.yaml index 02abc3a47e..5b3488f9c4 100644 --- a/plots/bar-error/metadata/seaborn.yaml +++ b/plots/bar-error/metadata/seaborn.yaml @@ -1,10 +1,7 @@ -# Per-library metadata for seaborn implementation of bar-error -# Auto-generated by impl-generate.yml - library: seaborn specification_id: bar-error created: '2025-12-27T19:21:22Z' -updated: '2025-12-27T19:21:22Z' +updated: '2025-12-27T19:29:06Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20543280392 issue: 0 @@ -13,7 +10,20 @@ library_version: 0.13.2 preview_url: https://storage.googleapis.com/pyplots-images/plots/bar-error/seaborn/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/bar-error/seaborn/plot_thumb.png preview_html: null -quality_score: null +quality_score: 91 review: - strengths: [] - weaknesses: [] + strengths: + - Excellent text sizing following the 24/20/16pt guideline for large canvas + - Clean alternating color scheme that is colorblind-accessible + - Proper use of asymmetric error bars for percentage data as spec suggests + - Good annotation explaining what error bars represent (95% CI) + - Modern seaborn API usage with hue parameter to avoid deprecation warnings + - Y-axis correctly starts at 0 for proper bar comparison + - Realistic A/B testing scenario with plausible conversion rate values + weaknesses: + - Error bars added via matplotlib errorbar() rather than exploring seaborn native + statistical capabilities + - The annotation box could be positioned closer to the data area rather than isolated + in the corner + - Feature coverage could show more variation (e.g., one notably different group + or wider CI range)