Skip to content

Commit e5688ee

Browse files
committed
Tune hvPlot dodged bars and harden the Bokeh webdriver lookup
1 parent eed3a96 commit e5688ee

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ All plots are rendered to static PNG images inside the executed notebook:
9595
- **Plotly**: `pio.renderers.default = "png"` with Kaleido (needs Chrome; `uv run kaleido_get_chrome`)
9696
- **Altair**: `alt.renderers.enable("png")` with vl-convert-python (set in the notebook's first cell — do not remove)
9797
- **R/ggplot2**: rpy2 against the system R installation (`%%R` cell magic)
98+
- **Lets-Plot** and **hvPlot/Bokeh**: an `image/png` IPython formatter registered in the notebook's first cell. Bokeh has no headless renderer, so hvPlot figures are screenshotted through Selenium driving the same Chrome for Testing build Kaleido downloads; Selenium Manager fetches the matching chromedriver on first use (needs network).
9899

99100
## Adding New Plots
100101

Examples.ipynb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,10 @@
131131
" from choreographer.browsers.chromium import Chromium\n",
132132
"\n",
133133
" options.binary_location = str(Chromium.find_browser(skip_local=False))\n",
134+
" _bokeh_driver = Chrome(options=options)\n",
134135
" except Exception: # fall back to whatever Chrome is on the system\n",
135-
" pass\n",
136-
" _bokeh_driver = Chrome(options=options)\n",
136+
" options.binary_location = \"\"\n",
137+
" _bokeh_driver = Chrome(options=options)\n",
137138
" atexit.register(_bokeh_driver.quit)\n",
138139
" return _bokeh_driver\n",
139140
"\n",
@@ -2138,8 +2139,8 @@
21382139
" .groupby([\"cut\", \"clarity\"])\n",
21392140
" .size()\n",
21402141
" .unstack()\n",
2141-
" .hvplot.bar(stacked=False, rot=45,\n",
2142-
" legend=\"top_left\"))"
2142+
" .hvplot.bar(stacked=False, rot=90,\n",
2143+
" fontscale=0.9))"
21432144
]
21442145
},
21452146
{

0 commit comments

Comments
 (0)