From 2b135dcf5e4f2cec5d2849080b160c1091799cdb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Dec 2025 19:21:54 +0000 Subject: [PATCH 1/3] feat(pygal): implement bar-error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- plots/bar-error/implementations/pygal.py | 72 ++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 plots/bar-error/implementations/pygal.py diff --git a/plots/bar-error/implementations/pygal.py b/plots/bar-error/implementations/pygal.py new file mode 100644 index 0000000000..b615adc8b7 --- /dev/null +++ b/plots/bar-error/implementations/pygal.py @@ -0,0 +1,72 @@ +"""pyplots.ai +bar-error: Bar Chart with Error Bars +Library: pygal | Python 3.13 +Quality: pending | Created: 2025-12-27 +""" + +import pygal +from pygal.style import Style + + +# Data: Experimental results comparing treatment effectiveness +# Mean values with standard deviations (±1 SD) +categories = ["Control", "Treatment A", "Treatment B", "Treatment C", "Treatment D"] +values = [45.2, 62.8, 78.3, 55.1, 71.5] +errors = [8.5, 12.3, 9.7, 15.2, 11.8] + +# Custom style for 4800x2700 canvas +custom_style = Style( + background="white", + plot_background="white", + foreground="#333333", + foreground_strong="#333333", + foreground_subtle="#666666", + colors=("#306998", "#FFD43B", "#4CAF50", "#E91E63", "#9C27B0"), + font_family="DejaVu Sans, Verdana, sans-serif", + title_font_size=72, + label_font_size=48, + major_label_font_size=48, + legend_font_size=48, + value_font_size=36, + value_label_font_size=36, + tooltip_font_size=36, +) + +# Create bar chart with error bars (confidence intervals) +chart = pygal.Bar( + width=4800, + height=2700, + style=custom_style, + title="bar-error \u00b7 pygal \u00b7 pyplots.ai", + x_title="Treatment Group", + y_title="Response Value (units)", + show_legend=True, + legend_at_bottom=True, + legend_at_bottom_columns=1, + show_y_guides=True, + show_x_guides=False, + print_values=False, + range=(0, 100), + spacing=40, + margin=100, + margin_bottom=250, + margin_left=200, + margin_top=180, + dots_size=8, + stroke_style={"width": 4}, +) + +# X-axis labels +chart.x_labels = categories + +# Add data with confidence intervals (error bars) +# Each value is a dict with 'value' and 'ci' containing 'low' and 'high' +data_with_errors = [] +for val, err in zip(values, errors, strict=True): + data_with_errors.append({"value": val, "ci": {"low": val - err, "high": val + err}}) + +chart.add("Mean \u00b1 1 SD", data_with_errors) + +# Save as PNG and HTML (interactive) +chart.render_to_png("plot.png") +chart.render_to_file("plot.html") From 88beaf1f61a368868bbbf38d62a7fffaa5f157cc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Dec 2025 19:22:13 +0000 Subject: [PATCH 2/3] chore(pygal): add metadata for bar-error --- plots/bar-error/metadata/pygal.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plots/bar-error/metadata/pygal.yaml diff --git a/plots/bar-error/metadata/pygal.yaml b/plots/bar-error/metadata/pygal.yaml new file mode 100644 index 0000000000..77974078e4 --- /dev/null +++ b/plots/bar-error/metadata/pygal.yaml @@ -0,0 +1,19 @@ +# Per-library metadata for pygal implementation of bar-error +# Auto-generated by impl-generate.yml + +library: pygal +specification_id: bar-error +created: '2025-12-27T19:22:12Z' +updated: '2025-12-27T19:22:12Z' +generated_by: claude-opus-4-5-20251101 +workflow_run: 20543283514 +issue: 0 +python_version: 3.13.11 +library_version: 3.1.0 +preview_url: https://storage.googleapis.com/pyplots-images/plots/bar-error/pygal/plot.png +preview_thumb: https://storage.googleapis.com/pyplots-images/plots/bar-error/pygal/plot_thumb.png +preview_html: https://storage.googleapis.com/pyplots-images/plots/bar-error/pygal/plot.html +quality_score: null +review: + strengths: [] + weaknesses: [] From 36547619d2935df5483122d253ae59fbe95517a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Dec 2025 19:29:48 +0000 Subject: [PATCH 3/3] chore(pygal): update quality score 91 and review feedback for bar-error --- plots/bar-error/implementations/pygal.py | 6 +++--- plots/bar-error/metadata/pygal.yaml | 20 +++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/plots/bar-error/implementations/pygal.py b/plots/bar-error/implementations/pygal.py index b615adc8b7..6064577dc5 100644 --- a/plots/bar-error/implementations/pygal.py +++ b/plots/bar-error/implementations/pygal.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai bar-error: Bar Chart with Error Bars -Library: pygal | Python 3.13 -Quality: pending | Created: 2025-12-27 +Library: pygal 3.1.0 | Python 3.13.11 +Quality: 91/100 | Created: 2025-12-27 """ import pygal diff --git a/plots/bar-error/metadata/pygal.yaml b/plots/bar-error/metadata/pygal.yaml index 77974078e4..b5a326c1e9 100644 --- a/plots/bar-error/metadata/pygal.yaml +++ b/plots/bar-error/metadata/pygal.yaml @@ -1,10 +1,7 @@ -# Per-library metadata for pygal implementation of bar-error -# Auto-generated by impl-generate.yml - library: pygal specification_id: bar-error created: '2025-12-27T19:22:12Z' -updated: '2025-12-27T19:22:12Z' +updated: '2025-12-27T19:29:48Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20543283514 issue: 0 @@ -13,7 +10,16 @@ library_version: 3.1.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/bar-error/pygal/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/bar-error/pygal/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/bar-error/pygal/plot.html -quality_score: null +quality_score: 91 review: - strengths: [] - weaknesses: [] + strengths: + - Excellent use of pygal native confidence interval (ci) feature for error bars + with caps + - Clean professional appearance with appropriate font scaling for 4800x2700 canvas + - Well-chosen scientific context (treatment comparison) that matches spec applications + - Proper title format and comprehensive axis labeling with units + - Good use of custom Style for consistent visual appearance + weaknesses: + - Legend placement at bottom-left corner appears disconnected from the chart + - Grid lines could be more subtle (currently dotted but still prominent) + - Only symmetric error bars shown when spec mentions asymmetric as an option