From 1de0d50af801cee22d89953e5fa4e247b4cb00bc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 11:21:59 +0000 Subject: [PATCH 1/3] feat(pygal): implement histogram-stepwise --- .../implementations/pygal.py | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 plots/histogram-stepwise/implementations/pygal.py diff --git a/plots/histogram-stepwise/implementations/pygal.py b/plots/histogram-stepwise/implementations/pygal.py new file mode 100644 index 0000000000..3026b486e8 --- /dev/null +++ b/plots/histogram-stepwise/implementations/pygal.py @@ -0,0 +1,74 @@ +"""pyplots.ai +histogram-stepwise: Step Histogram +Library: pygal | Python 3.13 +Quality: pending | Created: 2025-12-30 +""" + +import numpy as np +import pygal +from pygal.style import Style + + +# Data +np.random.seed(42) +values = np.concatenate([np.random.normal(50, 10, 200), np.random.normal(80, 8, 150)]) + +# Compute histogram bins +counts, bin_edges = np.histogram(values, bins=25) + +# Build step coordinates for pygal.XY +# Step histogram: horizontal segments at count levels, vertical connections +step_data = [] +for i in range(len(counts)): + left = bin_edges[i] + right = bin_edges[i + 1] + count = counts[i] + # Horizontal segment for this bin + step_data.append((left, count)) + step_data.append((right, count)) + +# Add baseline at start and end +step_data.insert(0, (bin_edges[0], 0)) +step_data.append((bin_edges[-1], 0)) + +# Custom style for large canvas +custom_style = Style( + background="white", + plot_background="white", + foreground="#333333", + foreground_strong="#333333", + foreground_subtle="#666666", + colors=("#306998",), + title_font_size=48, + label_font_size=36, + major_label_font_size=32, + legend_font_size=32, + value_font_size=28, + stroke_width=4, + opacity=1.0, + opacity_hover=1.0, +) + +# Create XY chart for step lines +chart = pygal.XY( + width=4800, + height=2700, + style=custom_style, + title="histogram-stepwise · pygal · pyplots.ai", + x_title="Value", + y_title="Frequency", + show_dots=False, + stroke_style={"width": 4}, + fill=False, + show_legend=False, + show_y_guides=True, + show_x_guides=False, + x_label_rotation=0, +) + +# Add step line data +chart.add("Distribution", step_data) + +# Save outputs +chart.render_to_file("plot.html") +chart.render_to_png("plot.png") From 9090e13506ffb81f3e182131ac35e85e2bf68fd8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 11:22:09 +0000 Subject: [PATCH 2/3] chore(pygal): add metadata for histogram-stepwise --- plots/histogram-stepwise/metadata/pygal.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plots/histogram-stepwise/metadata/pygal.yaml diff --git a/plots/histogram-stepwise/metadata/pygal.yaml b/plots/histogram-stepwise/metadata/pygal.yaml new file mode 100644 index 0000000000..07fb502c45 --- /dev/null +++ b/plots/histogram-stepwise/metadata/pygal.yaml @@ -0,0 +1,19 @@ +# Per-library metadata for pygal implementation of histogram-stepwise +# Auto-generated by impl-generate.yml + +library: pygal +specification_id: histogram-stepwise +created: '2025-12-30T11:22:08Z' +updated: '2025-12-30T11:22:08Z' +generated_by: claude-opus-4-5-20251101 +workflow_run: 20595338040 +issue: 0 +python_version: 3.13.11 +library_version: 3.1.0 +preview_url: https://storage.googleapis.com/pyplots-images/plots/histogram-stepwise/pygal/plot.png +preview_thumb: https://storage.googleapis.com/pyplots-images/plots/histogram-stepwise/pygal/plot_thumb.png +preview_html: https://storage.googleapis.com/pyplots-images/plots/histogram-stepwise/pygal/plot.html +quality_score: null +review: + strengths: [] + weaknesses: [] From db7dfe4926881f26d955d1cc2188b91fdb17c370 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 11:29:14 +0000 Subject: [PATCH 3/3] chore(pygal): update quality score 91 and review feedback for histogram-stepwise --- .../implementations/pygal.py | 6 +++--- plots/histogram-stepwise/metadata/pygal.yaml | 20 ++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/plots/histogram-stepwise/implementations/pygal.py b/plots/histogram-stepwise/implementations/pygal.py index 3026b486e8..246693afe3 100644 --- a/plots/histogram-stepwise/implementations/pygal.py +++ b/plots/histogram-stepwise/implementations/pygal.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai histogram-stepwise: Step Histogram -Library: pygal | Python 3.13 -Quality: pending | Created: 2025-12-30 +Library: pygal 3.1.0 | Python 3.13.11 +Quality: 91/100 | Created: 2025-12-30 """ import numpy as np diff --git a/plots/histogram-stepwise/metadata/pygal.yaml b/plots/histogram-stepwise/metadata/pygal.yaml index 07fb502c45..7e30872074 100644 --- a/plots/histogram-stepwise/metadata/pygal.yaml +++ b/plots/histogram-stepwise/metadata/pygal.yaml @@ -1,10 +1,7 @@ -# Per-library metadata for pygal implementation of histogram-stepwise -# Auto-generated by impl-generate.yml - library: pygal specification_id: histogram-stepwise created: '2025-12-30T11:22:08Z' -updated: '2025-12-30T11:22:08Z' +updated: '2025-12-30T11:29:13Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20595338040 issue: 0 @@ -13,7 +10,16 @@ library_version: 3.1.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/histogram-stepwise/pygal/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/histogram-stepwise/pygal/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/histogram-stepwise/pygal/plot.html -quality_score: null +quality_score: 91 review: - strengths: [] - weaknesses: [] + strengths: + - Excellent implementation of step histogram using XY chart with carefully constructed + step coordinates + - Clean, readable code with proper KISS structure and reproducible seed + - Bimodal distribution data effectively showcases the plot type ability to reveal + distribution shapes + - Proper title format and clear axis labels + - Good font sizing for the 4800x2700 canvas + weaknesses: + - Axis labels lack units (e.g., Value (units) or Frequency (count)) + - Could use more realistic/contextual data scenario instead of abstract values