Skip to content

Commit 7c4e4f0

Browse files
claude[bot]github-actions[bot]MarkusNeusinger
authored
feat(bokeh): implement scatter-basic (#366)
## Summary Implements `scatter-basic` for **bokeh** library. **Parent Issue:** #207 **Sub-Issue:** #255 **Base Branch:** `plot/scatter-basic` **Attempt:** 2/3 ## Implementation - `plots/bokeh/scatter/scatter-basic/default.py` ## Details - Uses `bokeh.plotting.figure` with `scatter()` method - Target dimensions: 4800 × 2700 px (16:9 aspect ratio) - Uses Python Blue color (#306998) from style guide - Font sizes follow style guide recommendations (20pt for title/labels, 16pt for tick labels) - Grid alpha set to 0.3 for subtle grid lines - Exports as PNG using `export_png()` ## ⚠️ CI Blocker - Workflow Change Required The CI tests are failing because the workflow needs to setup Chrome for bokeh (just like highcharts). This requires `workflows` permission and must be applied by a maintainer. **Error:** `RuntimeError: To use bokeh.io image export functions you need selenium` **Fix required in `.github/workflows/ci-plottest.yml`:** ```yaml # Change line 69-70 from: - name: Setup Chrome for Highcharts if: steps.detect_libs.outputs.has_plots == 'true' && contains(steps.detect_libs.outputs.libraries, 'highcharts') # To: - name: Setup Chrome for Bokeh/Highcharts if: steps.detect_libs.outputs.has_plots == 'true' && (contains(steps.detect_libs.outputs.libraries, 'bokeh') || contains(steps.detect_libs.outputs.libraries, 'highcharts')) ``` **Note:** The implementation itself is correct and works locally. The `lib-bokeh` extras in `pyproject.toml` already include selenium and webdriver-manager. --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Markus Neusinger <2921697+MarkusNeusinger@users.noreply.github.com>
1 parent b8c6137 commit 7c4e4f0

2 files changed

Lines changed: 1562 additions & 1524 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""
2+
scatter-basic: Basic Scatter Plot
3+
Library: bokeh
4+
"""
5+
6+
import numpy as np
7+
from bokeh.io import export_png
8+
from bokeh.models import ColumnDataSource
9+
from bokeh.plotting import figure
10+
11+
12+
# Data
13+
np.random.seed(42)
14+
x = np.random.randn(100) * 2 + 10
15+
y = x * 0.8 + np.random.randn(100) * 2
16+
17+
source = ColumnDataSource(data={"x": x, "y": y})
18+
19+
# Create figure (4800 × 2700 px for 16:9 aspect ratio)
20+
p = figure(width=4800, height=2700, title="Basic Scatter Plot", x_axis_label="X Value", y_axis_label="Y Value")
21+
22+
# Plot scatter
23+
p.scatter(x="x", y="y", source=source, size=12, color="#306998", alpha=0.7)
24+
25+
# Styling
26+
p.title.text_font_size = "20pt"
27+
p.xaxis.axis_label_text_font_size = "20pt"
28+
p.yaxis.axis_label_text_font_size = "20pt"
29+
p.xaxis.major_label_text_font_size = "16pt"
30+
p.yaxis.major_label_text_font_size = "16pt"
31+
p.grid.grid_line_alpha = 0.3
32+
33+
# Save
34+
export_png(p, filename="plot.png")

0 commit comments

Comments
 (0)