From 0ddcc6eff393daf1f70d8c7d7ce37559c587c818 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 11 Dec 2025 22:54:37 +0000 Subject: [PATCH 1/3] feat(altair): implement bar-basic --- plots/bar-basic/implementations/altair.py | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 plots/bar-basic/implementations/altair.py diff --git a/plots/bar-basic/implementations/altair.py b/plots/bar-basic/implementations/altair.py new file mode 100644 index 0000000000..9246732205 --- /dev/null +++ b/plots/bar-basic/implementations/altair.py @@ -0,0 +1,39 @@ +""" +bar-basic: Basic Bar Chart +Library: altair +""" + +import altair as alt +import pandas as pd + + +# Data +data = pd.DataFrame( + { + "category": ["Electronics", "Clothing", "Home & Garden", "Sports", "Books", "Toys", "Food"], + "value": [45200, 32100, 28400, 21800, 18500, 15200, 12300], + } +) + +# Chart +chart = ( + alt.Chart(data) + .mark_bar(color="#306998", cornerRadiusTopLeft=3, cornerRadiusTopRight=3) + .encode( + x=alt.X( + "category:N", + title="Product Category", + sort="-y", + axis=alt.Axis(labelAngle=-45, labelFontSize=16, titleFontSize=20), + ), + y=alt.Y("value:Q", title="Sales ($)", axis=alt.Axis(labelFontSize=16, titleFontSize=20)), + tooltip=[alt.Tooltip("category:N", title="Category"), alt.Tooltip("value:Q", title="Sales", format="$,.0f")], + ) + .properties(width=1600, height=900, title=alt.Title(text="Product Sales by Category", fontSize=24)) + .configure_view(strokeWidth=0) + .configure_axis(grid=True, gridOpacity=0.3) +) + +# Save as PNG and HTML +chart.save("plot.png", scale_factor=3.0) +chart.save("plot.html") From 547819eca6edd656c81d0438950d3926ef55eb13 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 11 Dec 2025 22:54:47 +0000 Subject: [PATCH 2/3] chore(altair): add metadata for bar-basic --- plots/bar-basic/metadata/altair.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 plots/bar-basic/metadata/altair.yaml diff --git a/plots/bar-basic/metadata/altair.yaml b/plots/bar-basic/metadata/altair.yaml new file mode 100644 index 0000000000..92f8681e27 --- /dev/null +++ b/plots/bar-basic/metadata/altair.yaml @@ -0,0 +1,18 @@ +# Per-library metadata for altair implementation of bar-basic +# Auto-generated by impl-generate.yml + +library: altair +specification_id: bar-basic + +preview_url: https://storage.googleapis.com/pyplots-images/plots/bar-basic/altair/plot.png +preview_html: https://storage.googleapis.com/pyplots-images/plots/bar-basic/altair/plot.html + +current: + version: 0 + generated_at: 2025-12-11T22:54:47Z + generated_by: claude-opus-4-5-20251101 + workflow_run: 20150015719 + issue: 612 + quality_score: null # Updated after review + +history: [] From 44f37f79e24254dbe5dca10e60c798b6ca05b17f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 11 Dec 2025 22:56:46 +0000 Subject: [PATCH 3/3] chore(altair): set quality score 92 for bar-basic --- plots/bar-basic/metadata/altair.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plots/bar-basic/metadata/altair.yaml b/plots/bar-basic/metadata/altair.yaml index 92f8681e27..75bf03153b 100644 --- a/plots/bar-basic/metadata/altair.yaml +++ b/plots/bar-basic/metadata/altair.yaml @@ -13,6 +13,6 @@ current: generated_by: claude-opus-4-5-20251101 workflow_run: 20150015719 issue: 612 - quality_score: null # Updated after review + quality_score: 92 history: []