Skip to content

feat: run the JupyterLite notebooks with ipympl and follow the plotting recipe - #193

Merged
petercorke merged 6 commits into
mainfrom
feat/notebooks-ipympl
Nov 21, 2026
Merged

petercorke merged 6 commits into
mainfrom
feat/notebooks-ipympl

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Switches the notebooks and the JupyterLite site from static inline figures to live ipympl figures, and brings the notebooks into line with the rvc-ecosystem notebooks.md recipe. Closes #148.

  • Site: the bootstrap cell installs ipympl in the browser, and the docs build installs it so the site carries the matplotlib extension. The step that rewrote %matplotlib ipympl to inline is removed. I tested this on a local JupyterLite build: figures are live and pixel values can be examined by hovering.
  • Header: the browser note in the "Configuring the Jupyter environment" cell no longer says pixel values cannot be examined in the browser.
  • Setup cells: every notebook selects %matplotlib ipympl and calls plt.close("all"), instead of a mix of inline, widget and ipympl.
  • Plotting: each plot starts with plt.subplots(), not a bare plt.figure() or the previous cell's figure, which matters now that figures stay open between cells. Unneeded plt.figure() calls before Histogram.plot are gone. The slider callbacks in camera_animation and image-motion redraw one figure instead of making a new one each time. block= and plt.show() are removed from the notebooks.
  • intro: the histogram cell uses the Histogram object's x and h, and the blob plot calls no longer pass an axes that those methods do not take.

I ran 11 of the notebooks headless; intro and the plotting cells now run. greyscale-images still fails on a missing idisp import, which a separate branch fixes. I have not yet checked the rendered result on the real docs site.

This change was written with AI assistance (Claude Code) and the diff reviewed by the maintainer.

🤖 Generated with Claude Code

petercorke and others added 5 commits November 21, 2026 12:36
ipympl is installed in the browser by the bootstrap cell and the site is
built with the jupyter-matplotlib extension, so the docs build no longer
rewrites %matplotlib ipympl to inline.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…in the browser

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Each plot starts with plt.subplots() instead of a bare plt.figure() or
reusing the previous figure, the slider callbacks redraw one figure, and
block= and plt.show() are gone. Needed now that figures persist under
ipympl instead of closing at the end of each cell.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@petercorke
petercorke merged commit fa8de87 into main Nov 21, 2026
34 checks passed
@petercorke
petercorke deleted the feat/notebooks-ipympl branch November 21, 2026 21:29
@github-actions github-actions Bot mentioned this pull request Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notebooks: adopt the rvc-ecosystem notebooks.md recipe, and make block= consistent

1 participant