Skip to content

chore: use the argument names of RTB 1.4.5 in the chapter 5 and 6 figure scripts - #57

Draft
petercorke wants to merge 1 commit into
mainfrom
chore/rtb-1.4.5-argument-names
Draft

petercorke wants to merge 1 commit into
mainfrom
chore/rtb-1.4.5-argument-names

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

Do not merge until RTB 1.4.5 is on PyPI. The scripts then only run with 1.4.5, and the book's rule is that every figure runs against the released RTB (1.4.4 today, which has only the old names). Opened as a draft so the change is ready and reviewable.

Renames the arguments that RTB 1.4.5 has deprecated, so the figure scripts run without DeprecationWarnings and keep working when the old names are removed:

Script Change
fig5_12.py goal_marker= → goal_style=
fig5_16.py path_marker= → path_style=
fig5_19.py, fig5_20.py edge=, vertex= → edge_style=, vertex_style=; path_marker= → path_style=
fig6_11.py, fig6_13.py plot_map(ellipse=) → ellipse_style=
fig6_17.py optimize/plot eopt=, vopt= → edge_style=, vertex_style=; text=False → labels=False; text=dict(...) → text_opt=dict(...)

Two arguments are dropped, because RTB 1.4.4 silently ignored them (it swallowed unknown keywords) and 1.4.5 makes them an error: colorbar=dict(shrink=1.2) in fig5_12.py and inflated=True in fig5_16.py (it is the default anyway). The generated figures do not change by this.

Visible changes to the figures (not from this PR, from RTB 1.4.5)

  • Fig 6.11, 6.13: the uncertainty ellipses are now each landmark's own covariance (errata drafted).
  • Fig 5.16, 5.20: path_marker used to have no effect and now does.
  • Fig 5.5: Bug2 path is 1302 points, not 1307.

Not in this PR

🤖 Generated with Claude Code

…ure scripts

Needs RTB 1.4.5: goal_style, path_style, edge_style, vertex_style,
ellipse_style, text_opt/labels and the optimize/plot_map style arguments.
colorbar=dict(shrink=1.2) (fig5_12) and inflated=True (fig5_16) were
silently ignored by RTB 1.4.4 and are an error in 1.4.5, so they are
dropped; the figures are unchanged by that.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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