Skip to content

docs(notebooks): follow the notebook plotting recipe, and fix a broken qplot call - #821

Merged
petercorke merged 3 commits into
mainfrom
docs/notebooks-recipe
Oct 17, 2026
Merged

petercorke merged 3 commits into
mainfrom
docs/notebooks-recipe

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Brings RTB's notebooks in line with the RVC ecosystem notebooks.md (petercorke/rvc-ecosystem):

  • %matplotlib notebook, which does not work in JupyterLab or Notebook 7, becomes %matplotlib ipympl (with plt.close("all") after it where pyplot is imported in the same cell).
  • The JupyterLite cell installs ipympl as well as the toolbox.
  • block= arguments that the notebook backends ignore, and plt.show() calls that only displayed a figure, are removed.
  • qplot was a module function and is now Trajectory.qplot. The notebooks still called the old name and raised AttributeError; they now call the method (or xplot for fdyn results).
  • docs.yml installs ipympl in the JupyterLite build environment so the jupyter-matplotlib extension is bundled into the site. Without it an ipympl figure is blank in the browser.

robotics.ipynb: only map.plot(block=None) changes. The other block=None calls there go to pgraph's own plot, not RTB's, so they are untouched.

Tested: on the desktop, kinematics.ipynb now runs with no errors (it had one, the qplot call). Not tested: the other notebooks end to end, and the JupyterLite side (RTB installing in the browser has its own open problems). The docs workflow builds the site, which will show whether the build still works.

🤖 Generated with Claude Code

…n qplot call

Bring RTB's notebooks in line with the RVC ecosystem notebooks.md:

- %matplotlib notebook, which does not work in JupyterLab or Notebook 7, becomes
  %matplotlib ipympl, with plt.close("all") after it where pyplot is imported in
  the same cell;
- the JupyterLite cell installs ipympl as well as the toolbox;
- block= arguments that the notebook backends ignore, and plt.show() calls that
  only displayed a figure, are removed;
- qplot, which was a module function and is now Trajectory.qplot, is called as
  the method (or xplot for fdyn results): the calls raised AttributeError.

The docs workflow installs ipympl in the JupyterLite build environment so that the
jupyter-matplotlib extension is bundled into the site; without it an ipympl figure
is blank in the browser.

Tested on the desktop only: kinematics.ipynb runs with no errors (it had one, the
qplot call).  The JupyterLite side is not tested.

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

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.

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (4aeefdb) to head (553a0c7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #821   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        144     144           
  Lines      14938   14938           
=====================================
  Misses     14938   14938           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@petercorke
petercorke enabled auto-merge (squash) October 17, 2026 02:34
@petercorke
petercorke merged commit 7690e80 into main Oct 17, 2026
23 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 17, 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.

1 participant