From 9c10deb6628a0aeb9a5e09c6a236dd075ca7ea6d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Dec 2025 19:35:34 +0000 Subject: [PATCH 1/9] feat(pygal): implement residual-plot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Opus 4.5 --- plots/residual-plot/implementations/pygal.py | 87 ++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 plots/residual-plot/implementations/pygal.py diff --git a/plots/residual-plot/implementations/pygal.py b/plots/residual-plot/implementations/pygal.py new file mode 100644 index 0000000000..d388a79d81 --- /dev/null +++ b/plots/residual-plot/implementations/pygal.py @@ -0,0 +1,87 @@ +"""pyplots.ai +residual-plot: Residual Plot +Library: pygal | Python 3.13 +Quality: pending | Created: 2025-12-26 +""" + +import numpy as np +import pygal +from pygal.style import Style + + +# Data - Linear regression example with some non-linearity +np.random.seed(42) +n_points = 100 + +# Generate fitted values (x-axis) +fitted_values = np.linspace(10, 100, n_points) + +# Generate residuals with slight heteroscedasticity and a few outliers +base_residuals = np.random.normal(0, 5, n_points) +# Add slight heteroscedasticity (variance increases with fitted values) +heteroscedasticity = (fitted_values / 100) * np.random.normal(0, 3, n_points) +residuals = base_residuals + heteroscedasticity + +# Add a few outliers +outlier_indices = [15, 45, 78] +residuals[outlier_indices] = [25, -22, 28] + +# Calculate standard deviation for reference bands +std_residuals = np.std(residuals) + +# Identify outliers (beyond 2 standard deviations) +outlier_mask = np.abs(residuals) > 2 * std_residuals + +# Custom style for 4800x2700 canvas +custom_style = Style( + background="white", + plot_background="white", + foreground="#333333", + foreground_strong="#333333", + foreground_subtle="#666666", + colors=("#306998", "#E74C3C", "#888888"), # Python Blue, red for outliers, gray for zero line + title_font_size=60, + label_font_size=44, + major_label_font_size=40, + legend_font_size=40, + value_font_size=32, + tooltip_font_size=32, + stroke_width=3, +) + +# Create XY scatter chart for residual plot +chart = pygal.XY( + width=4800, + height=2700, + style=custom_style, + title="residual-plot · pygal · pyplots.ai", + x_title="Fitted Values", + y_title="Residuals", + show_legend=True, + legend_at_bottom=True, + legend_at_bottom_columns=3, + show_x_guides=True, + show_y_guides=True, + stroke=False, + dots_size=18, + truncate_legend=-1, + x_label_rotation=0, +) + +# Prepare data points - separate normal and outlier points +normal_points = [(float(fitted_values[i]), float(residuals[i])) for i in range(n_points) if not outlier_mask[i]] +outlier_points = [(float(fitted_values[i]), float(residuals[i])) for i in range(n_points) if outlier_mask[i]] + +# Add data series +chart.add("Residuals", normal_points) +chart.add("Outliers (>2σ)", outlier_points) + +# Add zero reference line (using Line chart overlay via XY with same points) +zero_line_points = [(float(fitted_values[0]), 0), (float(fitted_values[-1]), 0)] +chart.add( + "Zero Reference", zero_line_points, stroke=True, show_dots=False, stroke_style={"width": 4, "dasharray": "15, 10"} +) + +# Save as PNG and HTML +chart.render_to_png("plot.png") +chart.render_to_file("plot.html") From 11eb295b1d0b5bfe867bc2e2160b335ea59858d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Dec 2025 19:35:50 +0000 Subject: [PATCH 2/9] chore(pygal): add metadata for residual-plot --- plots/residual-plot/metadata/pygal.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plots/residual-plot/metadata/pygal.yaml diff --git a/plots/residual-plot/metadata/pygal.yaml b/plots/residual-plot/metadata/pygal.yaml new file mode 100644 index 0000000000..0a18582d7f --- /dev/null +++ b/plots/residual-plot/metadata/pygal.yaml @@ -0,0 +1,19 @@ +# Per-library metadata for pygal implementation of residual-plot +# Auto-generated by impl-generate.yml + +library: pygal +specification_id: residual-plot +created: '2025-12-26T19:35:50Z' +updated: '2025-12-26T19:35:50Z' +generated_by: claude-opus-4-5-20251101 +workflow_run: 20528206404 +issue: 0 +python_version: 3.13.11 +library_version: 3.1.0 +preview_url: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot.png +preview_thumb: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot_thumb.png +preview_html: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot.html +quality_score: null +review: + strengths: [] + weaknesses: [] From 1ab7a2ec4752913118b56a8a30c729c0c4717f0f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Dec 2025 19:40:27 +0000 Subject: [PATCH 3/9] chore(pygal): update quality score 88 and review feedback for residual-plot --- plots/residual-plot/implementations/pygal.py | 6 +++--- plots/residual-plot/metadata/pygal.yaml | 22 +++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/plots/residual-plot/implementations/pygal.py b/plots/residual-plot/implementations/pygal.py index d388a79d81..1d33d8570e 100644 --- a/plots/residual-plot/implementations/pygal.py +++ b/plots/residual-plot/implementations/pygal.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai residual-plot: Residual Plot -Library: pygal | Python 3.13 -Quality: pending | Created: 2025-12-26 +Library: pygal 3.1.0 | Python 3.13.11 +Quality: 88/100 | Created: 2025-12-26 """ import numpy as np diff --git a/plots/residual-plot/metadata/pygal.yaml b/plots/residual-plot/metadata/pygal.yaml index 0a18582d7f..54db535293 100644 --- a/plots/residual-plot/metadata/pygal.yaml +++ b/plots/residual-plot/metadata/pygal.yaml @@ -1,10 +1,7 @@ -# Per-library metadata for pygal implementation of residual-plot -# Auto-generated by impl-generate.yml - library: pygal specification_id: residual-plot created: '2025-12-26T19:35:50Z' -updated: '2025-12-26T19:35:50Z' +updated: '2025-12-26T19:40:27Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20528206404 issue: 0 @@ -13,7 +10,18 @@ library_version: 3.1.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot.html -quality_score: null +quality_score: 88 review: - strengths: [] - weaknesses: [] + strengths: + - Excellent implementation of outlier detection and visualization with distinct + coloring + - Clean separation of normal residuals vs outliers using mask + - Zero reference line implemented with dashed stroke style + - Demonstrates heteroscedasticity pattern effectively + - Font sizes appropriately scaled for 4800x2700 canvas + - Proper use of pygal XY chart for scatter data + weaknesses: + - Missing ±2σ horizontal bands which would enhance diagnostic value + - Axis labels lack units (generic Fitted Values and Residuals) + - Legend entry for Zero Reference shows colored square instead of line representation + - Font sizes in Style deviate from library guide recommendations From d09288b46007ecf72759dcecda8fd6c1b0b4d097 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Dec 2025 19:44:00 +0000 Subject: [PATCH 4/9] fix(pygal): address review feedback for residual-plot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add ±2σ horizontal threshold bands for improved diagnostic value - Add descriptive axis labels with units (house price context in $1000s) - Improve legend labels for reference lines (y=0, +2σ, −2σ) - Adjust font sizes to match library guide recommendations Attempt 1/3 - fixes based on AI review 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- plots/residual-plot/implementations/pygal.py | 61 +++++++++++++------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/plots/residual-plot/implementations/pygal.py b/plots/residual-plot/implementations/pygal.py index 1d33d8570e..3eebc31995 100644 --- a/plots/residual-plot/implementations/pygal.py +++ b/plots/residual-plot/implementations/pygal.py @@ -1,4 +1,4 @@ -""" pyplots.ai +"""pyplots.ai residual-plot: Residual Plot Library: pygal 3.1.0 | Python 3.13.11 Quality: 88/100 | Created: 2025-12-26 @@ -13,39 +13,41 @@ np.random.seed(42) n_points = 100 -# Generate fitted values (x-axis) -fitted_values = np.linspace(10, 100, n_points) +# Generate fitted values (x-axis) - house price predictions in $1000s +fitted_values = np.linspace(150, 500, n_points) # Generate residuals with slight heteroscedasticity and a few outliers -base_residuals = np.random.normal(0, 5, n_points) +base_residuals = np.random.normal(0, 20, n_points) # Add slight heteroscedasticity (variance increases with fitted values) -heteroscedasticity = (fitted_values / 100) * np.random.normal(0, 3, n_points) +heteroscedasticity = (fitted_values / 500) * np.random.normal(0, 15, n_points) residuals = base_residuals + heteroscedasticity # Add a few outliers outlier_indices = [15, 45, 78] -residuals[outlier_indices] = [25, -22, 28] +residuals[outlier_indices] = [85, -75, 90] # Calculate standard deviation for reference bands std_residuals = np.std(residuals) +upper_band = 2 * std_residuals +lower_band = -2 * std_residuals # Identify outliers (beyond 2 standard deviations) outlier_mask = np.abs(residuals) > 2 * std_residuals -# Custom style for 4800x2700 canvas +# Custom style for 4800x2700 canvas following library guide recommendations custom_style = Style( background="white", plot_background="white", foreground="#333333", foreground_strong="#333333", foreground_subtle="#666666", - colors=("#306998", "#E74C3C", "#888888"), # Python Blue, red for outliers, gray for zero line - title_font_size=60, - label_font_size=44, - major_label_font_size=40, - legend_font_size=40, - value_font_size=32, - tooltip_font_size=32, + colors=("#306998", "#E74C3C", "#666666", "#95a5a6", "#95a5a6"), + title_font_size=28, + label_font_size=18, + major_label_font_size=16, + legend_font_size=16, + value_font_size=14, + tooltip_font_size=14, stroke_width=3, ) @@ -55,15 +57,15 @@ height=2700, style=custom_style, title="residual-plot · pygal · pyplots.ai", - x_title="Fitted Values", - y_title="Residuals", + x_title="Fitted Values (Predicted Price in $1000s)", + y_title="Residuals (Actual - Predicted in $1000s)", show_legend=True, legend_at_bottom=True, - legend_at_bottom_columns=3, + legend_at_bottom_columns=5, show_x_guides=True, show_y_guides=True, stroke=False, - dots_size=18, + dots_size=12, truncate_legend=-1, x_label_rotation=0, ) @@ -76,10 +78,27 @@ chart.add("Residuals", normal_points) chart.add("Outliers (>2σ)", outlier_points) -# Add zero reference line (using Line chart overlay via XY with same points) -zero_line_points = [(float(fitted_values[0]), 0), (float(fitted_values[-1]), 0)] +# Add zero reference line (dashed) +x_min, x_max = float(fitted_values[0]), float(fitted_values[-1]) +zero_line_points = [(x_min, 0), (x_max, 0)] chart.add( - "Zero Reference", zero_line_points, stroke=True, show_dots=False, stroke_style={"width": 4, "dasharray": "15, 10"} + "y = 0 (Perfect Fit)", + zero_line_points, + stroke=True, + show_dots=False, + stroke_style={"width": 4, "dasharray": "15, 10"}, +) + +# Add +2σ reference band line +upper_band_points = [(x_min, float(upper_band)), (x_max, float(upper_band))] +chart.add( + "+2σ Threshold", upper_band_points, stroke=True, show_dots=False, stroke_style={"width": 2, "dasharray": "8, 6"} +) + +# Add -2σ reference band line +lower_band_points = [(x_min, float(lower_band)), (x_max, float(lower_band))] +chart.add( + "−2σ Threshold", lower_band_points, stroke=True, show_dots=False, stroke_style={"width": 2, "dasharray": "8, 6"} ) # Save as PNG and HTML From b7a43332091e9a9634368ed7f0936a89671b350a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Dec 2025 19:46:28 +0000 Subject: [PATCH 5/9] chore(pygal): update quality score 78 and review feedback for residual-plot --- plots/residual-plot/implementations/pygal.py | 4 +-- plots/residual-plot/metadata/pygal.yaml | 27 ++++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/plots/residual-plot/implementations/pygal.py b/plots/residual-plot/implementations/pygal.py index 3eebc31995..08cdc1407e 100644 --- a/plots/residual-plot/implementations/pygal.py +++ b/plots/residual-plot/implementations/pygal.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai residual-plot: Residual Plot Library: pygal 3.1.0 | Python 3.13.11 -Quality: 88/100 | Created: 2025-12-26 +Quality: 78/100 | Created: 2025-12-26 """ import numpy as np diff --git a/plots/residual-plot/metadata/pygal.yaml b/plots/residual-plot/metadata/pygal.yaml index 54db535293..b701975b50 100644 --- a/plots/residual-plot/metadata/pygal.yaml +++ b/plots/residual-plot/metadata/pygal.yaml @@ -1,7 +1,7 @@ library: pygal specification_id: residual-plot created: '2025-12-26T19:35:50Z' -updated: '2025-12-26T19:40:27Z' +updated: '2025-12-26T19:46:28Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20528206404 issue: 0 @@ -10,18 +10,19 @@ library_version: 3.1.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot.html -quality_score: 88 +quality_score: 78 review: strengths: - - Excellent implementation of outlier detection and visualization with distinct - coloring - - Clean separation of normal residuals vs outliers using mask - - Zero reference line implemented with dashed stroke style - - Demonstrates heteroscedasticity pattern effectively - - Font sizes appropriately scaled for 4800x2700 canvas - - Proper use of pygal XY chart for scatter data + - Proper separation of normal residuals and outliers with distinct colors + - Correct title format following pyplots.ai conventions + - Good use of custom Style for canvas sizing and fonts + - Realistic house price prediction scenario with heteroscedasticity + - Clean KISS code structure with proper reproducibility (seed=42) + - Good dot sizing for the data density (100 points) weaknesses: - - Missing ±2σ horizontal bands which would enhance diagnostic value - - Axis labels lack units (generic Fitted Values and Residuals) - - Legend entry for Zero Reference shows colored square instead of line representation - - Font sizes in Style deviate from library guide recommendations + - 'X-axis values render incorrectly: code specifies fitted values 150-500 but plot + shows 10-100 (pygal may be using index positions)' + - Axis labels lose their units in rendering (should show $1000s suffix) + - The ±2σ threshold dashed lines are not visible in the rendered output despite + being added to the chart + - 'Legend label mismatch: Zero Reference rendered vs y = 0 (Perfect Fit) in code' From 8802433237effa2812ffd5ad5aa30685230a8289 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Dec 2025 19:51:12 +0000 Subject: [PATCH 6/9] fix(pygal): address review feedback for residual-plot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Attempt 2/3 - fixes based on AI review: - Fix X-axis values to show actual fitted values (150-500) using explicit x_labels and xrange - Add units to axis labels (000s suffix) - Make ±2σ threshold dashed lines visible with more points and proper stroke style - Fix legend labels for consistency (Zero Reference instead of y=0) - Set explicit y-axis range to accommodate outliers --- plots/residual-plot/implementations/pygal.py | 39 ++++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/plots/residual-plot/implementations/pygal.py b/plots/residual-plot/implementations/pygal.py index 08cdc1407e..c4116874db 100644 --- a/plots/residual-plot/implementations/pygal.py +++ b/plots/residual-plot/implementations/pygal.py @@ -1,4 +1,4 @@ -""" pyplots.ai +"""pyplots.ai residual-plot: Residual Plot Library: pygal 3.1.0 | Python 3.13.11 Quality: 78/100 | Created: 2025-12-26 @@ -41,7 +41,7 @@ foreground="#333333", foreground_strong="#333333", foreground_subtle="#666666", - colors=("#306998", "#E74C3C", "#666666", "#95a5a6", "#95a5a6"), + colors=("#306998", "#E74C3C", "#2C3E50", "#7F8C8D", "#7F8C8D"), title_font_size=28, label_font_size=18, major_label_font_size=16, @@ -52,13 +52,14 @@ ) # Create XY scatter chart for residual plot +# Use explicit x_labels to control axis display and range settings chart = pygal.XY( width=4800, height=2700, style=custom_style, title="residual-plot · pygal · pyplots.ai", - x_title="Fitted Values (Predicted Price in $1000s)", - y_title="Residuals (Actual - Predicted in $1000s)", + x_title="Fitted Values - Predicted Price ($1000s)", + y_title="Residuals - Actual minus Predicted ($1000s)", show_legend=True, legend_at_bottom=True, legend_at_bottom_columns=5, @@ -68,8 +69,13 @@ dots_size=12, truncate_legend=-1, x_label_rotation=0, + xrange=(140, 510), + range=(-100, 110), ) +# Set explicit x-axis labels to display actual fitted values (not indices) +chart.x_labels = [150, 200, 250, 300, 350, 400, 450, 500] + # Prepare data points - separate normal and outlier points normal_points = [(float(fitted_values[i]), float(residuals[i])) for i in range(n_points) if not outlier_mask[i]] outlier_points = [(float(fitted_values[i]), float(residuals[i])) for i in range(n_points) if outlier_mask[i]] @@ -78,27 +84,20 @@ chart.add("Residuals", normal_points) chart.add("Outliers (>2σ)", outlier_points) -# Add zero reference line (dashed) -x_min, x_max = float(fitted_values[0]), float(fitted_values[-1]) -zero_line_points = [(x_min, 0), (x_max, 0)] -chart.add( - "y = 0 (Perfect Fit)", - zero_line_points, - stroke=True, - show_dots=False, - stroke_style={"width": 4, "dasharray": "15, 10"}, -) +# Add zero reference line - create more points for solid appearance +zero_line_points = [(float(x), 0.0) for x in np.linspace(150, 500, 50)] +chart.add("Zero Reference (Perfect Fit)", zero_line_points, stroke=True, show_dots=False, stroke_style={"width": 5}) -# Add +2σ reference band line -upper_band_points = [(x_min, float(upper_band)), (x_max, float(upper_band))] +# Add +2σ reference band line with multiple points for visibility +upper_band_points = [(float(x), float(upper_band)) for x in np.linspace(150, 500, 50)] chart.add( - "+2σ Threshold", upper_band_points, stroke=True, show_dots=False, stroke_style={"width": 2, "dasharray": "8, 6"} + "+2σ Threshold", upper_band_points, stroke=True, show_dots=False, stroke_style={"width": 3, "dasharray": "10, 8"} ) -# Add -2σ reference band line -lower_band_points = [(x_min, float(lower_band)), (x_max, float(lower_band))] +# Add -2σ reference band line with multiple points for visibility +lower_band_points = [(float(x), float(lower_band)) for x in np.linspace(150, 500, 50)] chart.add( - "−2σ Threshold", lower_band_points, stroke=True, show_dots=False, stroke_style={"width": 2, "dasharray": "8, 6"} + "-2σ Threshold", lower_band_points, stroke=True, show_dots=False, stroke_style={"width": 3, "dasharray": "10, 8"} ) # Save as PNG and HTML From 6724501e15083f8b0fa6b3543d10079dce5ae211 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Dec 2025 19:53:59 +0000 Subject: [PATCH 7/9] chore(pygal): update quality score 85 and review feedback for residual-plot --- plots/residual-plot/implementations/pygal.py | 4 ++-- plots/residual-plot/metadata/pygal.yaml | 24 ++++++++------------ 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/plots/residual-plot/implementations/pygal.py b/plots/residual-plot/implementations/pygal.py index c4116874db..965d6bdc89 100644 --- a/plots/residual-plot/implementations/pygal.py +++ b/plots/residual-plot/implementations/pygal.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai residual-plot: Residual Plot Library: pygal 3.1.0 | Python 3.13.11 -Quality: 78/100 | Created: 2025-12-26 +Quality: 85/100 | Created: 2025-12-26 """ import numpy as np diff --git a/plots/residual-plot/metadata/pygal.yaml b/plots/residual-plot/metadata/pygal.yaml index b701975b50..db4bdc7301 100644 --- a/plots/residual-plot/metadata/pygal.yaml +++ b/plots/residual-plot/metadata/pygal.yaml @@ -1,7 +1,7 @@ library: pygal specification_id: residual-plot created: '2025-12-26T19:35:50Z' -updated: '2025-12-26T19:46:28Z' +updated: '2025-12-26T19:53:58Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20528206404 issue: 0 @@ -10,19 +10,15 @@ library_version: 3.1.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot.html -quality_score: 78 +quality_score: 85 review: strengths: - - Proper separation of normal residuals and outliers with distinct colors - - Correct title format following pyplots.ai conventions - - Good use of custom Style for canvas sizing and fonts - - Realistic house price prediction scenario with heteroscedasticity - - Clean KISS code structure with proper reproducibility (seed=42) - - Good dot sizing for the data density (100 points) + - 'Excellent implementation of all spec requirements: zero reference line, ±2σ threshold + bands, and outlier highlighting in different color' + - Realistic house price prediction context with appropriate heteroscedasticity pattern + - Clean code structure following KISS principles with proper random seed + - Good use of pygal XY chart with custom styling for high-resolution output + - Proper axis labels with units and correct title format weaknesses: - - 'X-axis values render incorrectly: code specifies fitted values 150-500 but plot - shows 10-100 (pygal may be using index positions)' - - Axis labels lose their units in rendering (should show $1000s suffix) - - The ±2σ threshold dashed lines are not visible in the rendered output despite - being added to the chart - - 'Legend label mismatch: Zero Reference rendered vs y = 0 (Perfect Fit) in code' + - Legend text at bottom is too small to read clearly at the rendered scale + - Grid guides could be more subtle (lower alpha) for better visual balance From 749008271490bb4556cd3296a2ab945895335a85 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Dec 2025 19:56:59 +0000 Subject: [PATCH 8/9] fix(pygal): address review feedback for residual-plot Attempt 3/3 - fixes based on AI review: - Increased legend_font_size from 16 to 24 for better readability - Increased all font sizes for improved text legibility - Added subtle grid styling with lighter color (#DDDDDD) and dashed lines - Lightened threshold band colors for better visual balance --- plots/residual-plot/implementations/pygal.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/plots/residual-plot/implementations/pygal.py b/plots/residual-plot/implementations/pygal.py index 965d6bdc89..a9a5d457f5 100644 --- a/plots/residual-plot/implementations/pygal.py +++ b/plots/residual-plot/implementations/pygal.py @@ -1,4 +1,4 @@ -""" pyplots.ai +"""pyplots.ai residual-plot: Residual Plot Library: pygal 3.1.0 | Python 3.13.11 Quality: 85/100 | Created: 2025-12-26 @@ -40,15 +40,17 @@ plot_background="white", foreground="#333333", foreground_strong="#333333", - foreground_subtle="#666666", - colors=("#306998", "#E74C3C", "#2C3E50", "#7F8C8D", "#7F8C8D"), - title_font_size=28, - label_font_size=18, - major_label_font_size=16, - legend_font_size=16, - value_font_size=14, - tooltip_font_size=14, + foreground_subtle="#999999", + colors=("#306998", "#E74C3C", "#2C3E50", "#AAAAAA", "#AAAAAA"), + title_font_size=32, + label_font_size=22, + major_label_font_size=20, + legend_font_size=24, + value_font_size=16, + tooltip_font_size=16, stroke_width=3, + guide_stroke_color="#DDDDDD", + guide_stroke_dasharray="3, 3", ) # Create XY scatter chart for residual plot From a6c501015c47a3e1c0a32c97623a40576c56d78e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Dec 2025 19:59:17 +0000 Subject: [PATCH 9/9] chore(pygal): update quality score 88 and review feedback for residual-plot --- plots/residual-plot/implementations/pygal.py | 4 ++-- plots/residual-plot/metadata/pygal.yaml | 23 +++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/plots/residual-plot/implementations/pygal.py b/plots/residual-plot/implementations/pygal.py index a9a5d457f5..45b43215c9 100644 --- a/plots/residual-plot/implementations/pygal.py +++ b/plots/residual-plot/implementations/pygal.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai residual-plot: Residual Plot Library: pygal 3.1.0 | Python 3.13.11 -Quality: 85/100 | Created: 2025-12-26 +Quality: 88/100 | Created: 2025-12-26 """ import numpy as np diff --git a/plots/residual-plot/metadata/pygal.yaml b/plots/residual-plot/metadata/pygal.yaml index db4bdc7301..733f1c5cca 100644 --- a/plots/residual-plot/metadata/pygal.yaml +++ b/plots/residual-plot/metadata/pygal.yaml @@ -1,7 +1,7 @@ library: pygal specification_id: residual-plot created: '2025-12-26T19:35:50Z' -updated: '2025-12-26T19:53:58Z' +updated: '2025-12-26T19:59:17Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20528206404 issue: 0 @@ -10,15 +10,18 @@ library_version: 3.1.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/residual-plot/pygal/plot.html -quality_score: 85 +quality_score: 88 review: strengths: - - 'Excellent implementation of all spec requirements: zero reference line, ±2σ threshold - bands, and outlier highlighting in different color' - - Realistic house price prediction context with appropriate heteroscedasticity pattern - - Clean code structure following KISS principles with proper random seed - - Good use of pygal XY chart with custom styling for high-resolution output - - Proper axis labels with units and correct title format + - Excellent implementation of all spec requirements including zero reference line, + ±2σ threshold bands, and outlier highlighting + - Clean separation of normal points (blue) and outliers (red) using color differentiation + - Realistic house price prediction scenario with appropriate heteroscedasticity + pattern + - Good use of pygal XY chart with custom styling and stroke patterns for reference + lines + - Correct title format and descriptive axis labels with units weaknesses: - - Legend text at bottom is too small to read clearly at the rendered scale - - Grid guides could be more subtle (lower alpha) for better visual balance + - Legend text at bottom is too small to read clearly at the rendered size + - Axis tick label font size could be larger for better readability on the 4800x2700 + canvas