From dae4d87e58c3e94b5f69ae18ff06997d3df75fd7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Dec 2025 19:20:29 +0000 Subject: [PATCH 1/3] feat(plotly): implement bar-error --- plots/bar-error/implementations/plotly.py | 76 +++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 plots/bar-error/implementations/plotly.py diff --git a/plots/bar-error/implementations/plotly.py b/plots/bar-error/implementations/plotly.py new file mode 100644 index 0000000000..9eae1430ea --- /dev/null +++ b/plots/bar-error/implementations/plotly.py @@ -0,0 +1,76 @@ +"""pyplots.ai +bar-error: Bar Chart with Error Bars +Library: plotly | Python 3.13 +Quality: pending | Created: 2025-12-27 +""" + +import numpy as np +import plotly.graph_objects as go + + +# Data - Lab experiment comparing treatment effectiveness +np.random.seed(42) +categories = ["Control", "Treatment A", "Treatment B", "Treatment C", "Treatment D"] +values = np.array([45.2, 62.8, 58.3, 71.5, 55.9]) +# Asymmetric errors to show realistic experimental variation +errors_lower = np.array([4.2, 5.8, 3.9, 6.1, 4.5]) +errors_upper = np.array([5.1, 7.2, 4.6, 8.3, 5.8]) + +# Create figure +fig = go.Figure() + +fig.add_trace( + go.Bar( + x=categories, + y=values, + marker=dict(color="#306998", line=dict(color="#1e4d6b", width=2)), + error_y=dict( + type="data", + symmetric=False, + array=errors_upper, + arrayminus=errors_lower, + color="#333333", + thickness=3, + width=12, # Cap width + ), + name="Measurement", + ) +) + +# Layout for 4800x2700 px output +fig.update_layout( + title=dict( + text="Lab Treatment Results · bar-error · plotly · pyplots.ai", + font=dict(size=32, color="#333333"), + x=0.5, + xanchor="center", + ), + xaxis=dict(title=dict(text="Treatment Group", font=dict(size=24)), tickfont=dict(size=20), showgrid=False), + yaxis=dict( + title=dict(text="Response Value (%)", font=dict(size=24)), + tickfont=dict(size=20), + gridcolor="rgba(0,0,0,0.1)", + gridwidth=1, + range=[0, 90], + ), + template="plotly_white", + showlegend=False, + margin=dict(l=100, r=80, t=120, b=100), + annotations=[ + dict( + text="Error bars: ±1 SD (asymmetric)", + xref="paper", + yref="paper", + x=0.98, + y=0.98, + xanchor="right", + yanchor="top", + font=dict(size=18, color="#666666"), + showarrow=False, + ) + ], +) + +# Save as PNG (4800x2700 px) and HTML +fig.write_image("plot.png", width=1600, height=900, scale=3) +fig.write_html("plot.html", include_plotlyjs="cdn") From ae836200ca058f9993578b3d1117c4519f6f251c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Dec 2025 19:20:48 +0000 Subject: [PATCH 2/3] chore(plotly): add metadata for bar-error --- plots/bar-error/metadata/plotly.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plots/bar-error/metadata/plotly.yaml diff --git a/plots/bar-error/metadata/plotly.yaml b/plots/bar-error/metadata/plotly.yaml new file mode 100644 index 0000000000..13797bef2f --- /dev/null +++ b/plots/bar-error/metadata/plotly.yaml @@ -0,0 +1,19 @@ +# Per-library metadata for plotly implementation of bar-error +# Auto-generated by impl-generate.yml + +library: plotly +specification_id: bar-error +created: '2025-12-27T19:20:48Z' +updated: '2025-12-27T19:20:48Z' +generated_by: claude-opus-4-5-20251101 +workflow_run: 20543280389 +issue: 0 +python_version: 3.13.11 +library_version: 6.5.0 +preview_url: https://storage.googleapis.com/pyplots-images/plots/bar-error/plotly/plot.png +preview_thumb: https://storage.googleapis.com/pyplots-images/plots/bar-error/plotly/plot_thumb.png +preview_html: https://storage.googleapis.com/pyplots-images/plots/bar-error/plotly/plot.html +quality_score: null +review: + strengths: [] + weaknesses: [] From c7a874deded0e05bc14ee14746e5cf7bf0656714 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Dec 2025 19:25:46 +0000 Subject: [PATCH 3/3] chore(plotly): update quality score 92 and review feedback for bar-error --- plots/bar-error/implementations/plotly.py | 6 +++--- plots/bar-error/metadata/plotly.yaml | 24 ++++++++++++++++------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/plots/bar-error/implementations/plotly.py b/plots/bar-error/implementations/plotly.py index 9eae1430ea..1970cd40ad 100644 --- a/plots/bar-error/implementations/plotly.py +++ b/plots/bar-error/implementations/plotly.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai bar-error: Bar Chart with Error Bars -Library: plotly | Python 3.13 -Quality: pending | Created: 2025-12-27 +Library: plotly 6.5.0 | Python 3.13.11 +Quality: 92/100 | Created: 2025-12-27 """ import numpy as np diff --git a/plots/bar-error/metadata/plotly.yaml b/plots/bar-error/metadata/plotly.yaml index 13797bef2f..9a0d763faa 100644 --- a/plots/bar-error/metadata/plotly.yaml +++ b/plots/bar-error/metadata/plotly.yaml @@ -1,10 +1,7 @@ -# Per-library metadata for plotly implementation of bar-error -# Auto-generated by impl-generate.yml - library: plotly specification_id: bar-error created: '2025-12-27T19:20:48Z' -updated: '2025-12-27T19:20:48Z' +updated: '2025-12-27T19:25:46Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20543280389 issue: 0 @@ -13,7 +10,20 @@ library_version: 6.5.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/bar-error/plotly/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/bar-error/plotly/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/bar-error/plotly/plot.html -quality_score: null +quality_score: 92 review: - strengths: [] - weaknesses: [] + strengths: + - Excellent visual clarity with well-sized text and properly styled error bars with + visible caps + - Perfect spec compliance including the required annotation explaining error bar + meaning + - Realistic lab experiment context that demonstrates the practical use case + - Clean KISS code structure following all conventions + - Asymmetric error bars correctly implemented showing realistic experimental variation + weaknesses: + - Legend is disabled (showlegend=False) - while the annotation works, a legend entry + would be more standard + - Could leverage Plotly hover templates to show exact values and error ranges on + interaction + - Error magnitude variation across groups is relatively uniform - more dramatic + differences would better showcase the feature