From 635f0ec3b95a0f5317785c5355433ea4952ac7b2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 10:37:18 +0000 Subject: [PATCH 1/3] feat(plotnine): implement line-stepwise --- .../line-stepwise/implementations/plotnine.py | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 plots/line-stepwise/implementations/plotnine.py diff --git a/plots/line-stepwise/implementations/plotnine.py b/plots/line-stepwise/implementations/plotnine.py new file mode 100644 index 0000000000..7110c301d9 --- /dev/null +++ b/plots/line-stepwise/implementations/plotnine.py @@ -0,0 +1,65 @@ +"""pyplots.ai +line-stepwise: Step Line Plot +Library: plotnine | Python 3.13 +Quality: pending | Created: 2025-12-30 +""" + +import numpy as np +import pandas as pd +from plotnine import aes, element_text, geom_step, ggplot, labs, theme, theme_minimal + + +# Data - Server CPU utilization showing discrete state changes +np.random.seed(42) +hours = np.arange(0, 24) +# Simulate CPU utilization that changes in discrete steps +base_utilization = np.array( + [ + 15, + 15, + 12, + 10, + 10, + 20, # Night/early morning - low usage + 45, + 65, + 75, + 80, + 85, + 80, # Morning ramp-up - high load + 70, + 75, + 80, + 85, + 90, + 85, # Afternoon - peak hours + 70, + 55, + 40, + 30, + 25, + 18, # Evening wind-down + ] +) + +df = pd.DataFrame({"hour": hours, "cpu_utilization": base_utilization}) + +# Plot +plot = ( + ggplot(df, aes(x="hour", y="cpu_utilization")) + + geom_step(color="#306998", size=2, direction="hv") + + labs(x="Hour of Day", y="CPU Utilization (%)", title="line-stepwise · plotnine · pyplots.ai") + + theme_minimal() + + theme( + figure_size=(16, 9), + text=element_text(size=14), + axis_title=element_text(size=20), + axis_text=element_text(size=16), + plot_title=element_text(size=24), + panel_grid_major=element_text(color="#cccccc"), + panel_grid_minor=element_text(color="#eeeeee"), + ) +) + +# Save +plot.save("plot.png", dpi=300, verbose=False) From edbedb617146227a7f4e332d3b2b01696473dc07 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 10:37:31 +0000 Subject: [PATCH 2/3] chore(plotnine): add metadata for line-stepwise --- plots/line-stepwise/metadata/plotnine.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plots/line-stepwise/metadata/plotnine.yaml diff --git a/plots/line-stepwise/metadata/plotnine.yaml b/plots/line-stepwise/metadata/plotnine.yaml new file mode 100644 index 0000000000..cc8a675e4e --- /dev/null +++ b/plots/line-stepwise/metadata/plotnine.yaml @@ -0,0 +1,19 @@ +# Per-library metadata for plotnine implementation of line-stepwise +# Auto-generated by impl-generate.yml + +library: plotnine +specification_id: line-stepwise +created: '2025-12-30T10:37:30Z' +updated: '2025-12-30T10:37:30Z' +generated_by: claude-opus-4-5-20251101 +workflow_run: 20594559603 +issue: 0 +python_version: 3.13.11 +library_version: 0.15.2 +preview_url: https://storage.googleapis.com/pyplots-images/plots/line-stepwise/plotnine/plot.png +preview_thumb: https://storage.googleapis.com/pyplots-images/plots/line-stepwise/plotnine/plot_thumb.png +preview_html: null +quality_score: null +review: + strengths: [] + weaknesses: [] From cd55959cbf10429a6e43e6c96a019411d7453cdf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 10:43:58 +0000 Subject: [PATCH 3/3] chore(plotnine): update quality score 92 and review feedback for line-stepwise --- .../line-stepwise/implementations/plotnine.py | 6 +++--- plots/line-stepwise/metadata/plotnine.yaml | 20 ++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/plots/line-stepwise/implementations/plotnine.py b/plots/line-stepwise/implementations/plotnine.py index 7110c301d9..21535527a9 100644 --- a/plots/line-stepwise/implementations/plotnine.py +++ b/plots/line-stepwise/implementations/plotnine.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai line-stepwise: Step Line Plot -Library: plotnine | Python 3.13 -Quality: pending | Created: 2025-12-30 +Library: plotnine 0.15.2 | Python 3.13.11 +Quality: 92/100 | Created: 2025-12-30 """ import numpy as np diff --git a/plots/line-stepwise/metadata/plotnine.yaml b/plots/line-stepwise/metadata/plotnine.yaml index cc8a675e4e..f532a27c76 100644 --- a/plots/line-stepwise/metadata/plotnine.yaml +++ b/plots/line-stepwise/metadata/plotnine.yaml @@ -1,10 +1,7 @@ -# Per-library metadata for plotnine implementation of line-stepwise -# Auto-generated by impl-generate.yml - library: plotnine specification_id: line-stepwise created: '2025-12-30T10:37:30Z' -updated: '2025-12-30T10:37:30Z' +updated: '2025-12-30T10:43:58Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20594559603 issue: 0 @@ -13,7 +10,16 @@ library_version: 0.15.2 preview_url: https://storage.googleapis.com/pyplots-images/plots/line-stepwise/plotnine/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/line-stepwise/plotnine/plot_thumb.png preview_html: null -quality_score: null +quality_score: 92 review: - strengths: [] - weaknesses: [] + strengths: + - Excellent use of geom_step with direction="hv" for proper step function visualization + - Realistic and relatable CPU utilization scenario that perfectly demonstrates discrete + state changes + - Clean grammar of graphics implementation following plotnine best practices + - Well-balanced layout with appropriate text sizing for 4800x2700 output + - Data shows clear daily pattern with morning ramp-up, business hours peak, and + evening wind-down + weaknesses: + - 'Minor: panel_grid_major and panel_grid_minor use element_text() instead of element_line() + - this does not cause visible issues but is technically incorrect for grid styling'