From e9c0a539b8f08129b59b6fced97dd84a20d7b676 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 11:22:56 +0000 Subject: [PATCH 1/3] feat(bokeh): implement line-filled --- plots/line-filled/implementations/bokeh.py | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 plots/line-filled/implementations/bokeh.py diff --git a/plots/line-filled/implementations/bokeh.py b/plots/line-filled/implementations/bokeh.py new file mode 100644 index 0000000000..8fe5887ea5 --- /dev/null +++ b/plots/line-filled/implementations/bokeh.py @@ -0,0 +1,74 @@ +"""pyplots.ai +line-filled: Filled Line Plot +Library: bokeh | Python 3.13 +Quality: pending | Created: 2025-12-30 +""" + +import numpy as np +from bokeh.io import export_png, save +from bokeh.models import ColumnDataSource, HoverTool +from bokeh.plotting import figure +from bokeh.resources import CDN + + +# Data - Monthly website traffic over a year +np.random.seed(42) +months = np.arange(1, 13) +# Simulate traffic with seasonal trend (higher in summer/winter holidays) +base_traffic = 50000 +seasonal = 15000 * np.sin(2 * np.pi * (months - 3) / 12) # Peak in summer +trend = 2000 * months # Gradual growth +noise = np.random.normal(0, 3000, 12) +traffic = base_traffic + seasonal + trend + noise +traffic = np.maximum(traffic, 0) # Ensure positive values + +# Create ColumnDataSource +source = ColumnDataSource(data={"month": months, "traffic": traffic, "traffic_zero": np.zeros(len(months))}) + +# Create figure +p = figure( + width=4800, + height=2700, + title="line-filled · bokeh · pyplots.ai", + x_axis_label="Month", + y_axis_label="Website Visitors", +) + +# Filled area using varea +p.varea(x="month", y1="traffic_zero", y2="traffic", source=source, fill_color="#306998", fill_alpha=0.4) + +# Line on top of the fill +p.line(x="month", y="traffic", source=source, line_color="#306998", line_width=4) + +# Add points for visual emphasis +p.scatter(x="month", y="traffic", source=source, size=12, color="#306998", fill_alpha=0.8) + +# Add hover tool +hover = HoverTool(tooltips=[("Month", "@month"), ("Visitors", "@traffic{0,0}")]) +p.add_tools(hover) + +# Styling for large canvas +p.title.text_font_size = "28pt" +p.xaxis.axis_label_text_font_size = "22pt" +p.yaxis.axis_label_text_font_size = "22pt" +p.xaxis.major_label_text_font_size = "18pt" +p.yaxis.major_label_text_font_size = "18pt" + +# Grid styling +p.xgrid.grid_line_alpha = 0.3 +p.ygrid.grid_line_alpha = 0.3 +p.xgrid.grid_line_dash = [6, 4] +p.ygrid.grid_line_dash = [6, 4] + +# Background +p.background_fill_color = "#fafafa" +p.border_fill_color = "#ffffff" + +# X-axis ticks for each month +p.xaxis.ticker = list(range(1, 13)) + +# Save as PNG and HTML +export_png(p, filename="plot.png") + +# Also save interactive HTML +save(p, filename="plot.html", resources=CDN, title="line-filled · bokeh · pyplots.ai") From b49ef240e0d823a4afa32ad518c8a17fc0d59f3b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 11:23:14 +0000 Subject: [PATCH 2/3] chore(bokeh): add metadata for line-filled --- plots/line-filled/metadata/bokeh.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plots/line-filled/metadata/bokeh.yaml diff --git a/plots/line-filled/metadata/bokeh.yaml b/plots/line-filled/metadata/bokeh.yaml new file mode 100644 index 0000000000..ab44681efd --- /dev/null +++ b/plots/line-filled/metadata/bokeh.yaml @@ -0,0 +1,19 @@ +# Per-library metadata for bokeh implementation of line-filled +# Auto-generated by impl-generate.yml + +library: bokeh +specification_id: line-filled +created: '2025-12-30T11:23:14Z' +updated: '2025-12-30T11:23:14Z' +generated_by: claude-opus-4-5-20251101 +workflow_run: 20595334170 +issue: 0 +python_version: 3.13.11 +library_version: 3.8.1 +preview_url: https://storage.googleapis.com/pyplots-images/plots/line-filled/bokeh/plot.png +preview_thumb: https://storage.googleapis.com/pyplots-images/plots/line-filled/bokeh/plot_thumb.png +preview_html: https://storage.googleapis.com/pyplots-images/plots/line-filled/bokeh/plot.html +quality_score: null +review: + strengths: [] + weaknesses: [] From ecfd9dd435644956879dcbc3f5a088b43bdaf947 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 11:35:51 +0000 Subject: [PATCH 3/3] chore(bokeh): update quality score 91 and review feedback for line-filled --- plots/line-filled/implementations/bokeh.py | 6 +++--- plots/line-filled/metadata/bokeh.yaml | 20 +++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/plots/line-filled/implementations/bokeh.py b/plots/line-filled/implementations/bokeh.py index 8fe5887ea5..81220aacd8 100644 --- a/plots/line-filled/implementations/bokeh.py +++ b/plots/line-filled/implementations/bokeh.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai line-filled: Filled Line Plot -Library: bokeh | Python 3.13 -Quality: pending | Created: 2025-12-30 +Library: bokeh 3.8.1 | Python 3.13.11 +Quality: 91/100 | Created: 2025-12-30 """ import numpy as np diff --git a/plots/line-filled/metadata/bokeh.yaml b/plots/line-filled/metadata/bokeh.yaml index ab44681efd..7ea5c4c12b 100644 --- a/plots/line-filled/metadata/bokeh.yaml +++ b/plots/line-filled/metadata/bokeh.yaml @@ -1,10 +1,7 @@ -# Per-library metadata for bokeh implementation of line-filled -# Auto-generated by impl-generate.yml - library: bokeh specification_id: line-filled created: '2025-12-30T11:23:14Z' -updated: '2025-12-30T11:23:14Z' +updated: '2025-12-30T11:35:51Z' generated_by: claude-opus-4-5-20251101 workflow_run: 20595334170 issue: 0 @@ -13,7 +10,16 @@ library_version: 3.8.1 preview_url: https://storage.googleapis.com/pyplots-images/plots/line-filled/bokeh/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/line-filled/bokeh/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/line-filled/bokeh/plot.html -quality_score: null +quality_score: 91 review: - strengths: [] - weaknesses: [] + strengths: + - Excellent use of Bokeh's varea glyph for the filled area effect + - Clean implementation with ColumnDataSource for data management + - Interactive HTML output with HoverTool showing formatted visitor counts + - Proper font sizing for the 4800x2700 canvas + - Subtle grid styling with dashed lines and low alpha + - Realistic website traffic scenario with seasonal variation + weaknesses: + - Axis labels lack units (e.g., "Website Visitors (count)" or "Month of Year") + - Could use more distinctive Bokeh features like CustomJS, band annotations, or + span annotations to highlight peaks