Skip to content

chang_credible: pass scatter's size, colour and marker by keyword - #419

Merged
mmcky merged 1 commit into
mainfrom
chang-credible-scatter-keywords
Nov 22, 2026
Merged

mmcky merged 1 commit into
mainfrom
chang-credible-scatter-keywords

Conversation

@mmcky

@mmcky mmcky commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What

plot_equilibria in chang_credible passed the size, colour and marker to Axes.scatter positionally:

Before After
ax.scatter(R[0], R[1], 150, 'black', 'o', zorder=1) ax.scatter(R[0], R[1], s=150, c='black', marker='o', zorder=1)

Passing marker positionally has been deprecated since Matplotlib 3.10, and it becomes keyword-only in 3.12. So each of the page's two calls of plot_equilibria prints this into its output:

MatplotlibDeprecationWarning: Passing the marker parameter of scatter() positionally is deprecated since Matplotlib 3.10; the parameter will become keyword-only in 3.12.

The values are unchanged, so the figure should be the same. The two warnings were found by the environment scan of 2026-11-19, for QuantEcon/project-monorepo#77, and they are also in the build of this site from the lecture monorepo, QuantEcon/lectures#86.

lecture-dp publishes a copy of this lecture with the same line; it follows once this is merged.

Validation

Done on 2026-11-22; the evidence is in the comment below. The build re-executed chang_credible: the two warnings are gone, the three figures are byte-identical to main's, and nothing else on the page changed.

This changes lecture content, so it needs a person's review.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL

plot_equilibria passed `s`, `c` and `marker` to Axes.scatter positionally.
Passing `marker` positionally is deprecated since Matplotlib 3.10 and
becomes keyword-only in 3.12, so each of the page's two calls of
plot_equilibria printed a MatplotlibDeprecationWarning into its output.
The values are unchanged, so the figure is the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
@netlify

netlify Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!

Name Link
🔨 Latest commit caa7900
🔍 Latest deploy log https://app.netlify.com/projects/lustrous-melomakarona-3ee73e/deploys/6b02bae6e9249906c425db3c
😎 Deploy Preview https://deploy-preview-419--lustrous-melomakarona-3ee73e.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions
github-actions Bot temporarily deployed to pull request November 22, 2026 10:04 Inactive
@mmcky

mmcky commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Validation

This pull request's build, 45009483978 at caa7900, executed chang_credible alone (275 seconds) and took every other page from main's build cache. It is compared with main's two fresh builds of today at 63ef0be, this branch's base: 44998881695 and 45001954151, the build whose cache this one restored.

main, 44998881695 main, 45001954151 this pull request
MatplotlibDeprecationWarning in chang_credible's outputs 2 2 0
chang_credible's figures 2 2, byte-identical 2, byte-identical

Against 45001954151, two pages differ, out of 85:

  • chang_credible: the changed line itself (s=, c=, marker=), and the two warnings, which are gone. Every other output is the same.
  • status: the build's time, and chang_credible's run time on the execution table.

The build log has no Sphinx warning.

(Corrected 2026-11-22: the page has two figures, one per plot_equilibria call; the conclusion is unchanged.)

@mmcky
mmcky marked this pull request as ready for review November 22, 2026 10:08
Copilot AI adaptive review requested due to automatic review settings November 22, 2026 10:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human review is warranted because the change affects executable lecture content and rendered educational figures, requiring confirmation that the documented output and Matplotlib visuals remain equivalent across supported build environments.

No open issues 🎉

What changed in this PR

Updates the chang_credible lecture to use keyword arguments for Matplotlib's Axes.scatter, eliminating the positional marker deprecation while preserving the existing plot output.

Changes:

  • Passes scatter size, colour, and marker via s, c, and marker keywords.
  • Keeps the existing plotting values and behavior unchanged.
File Description
lectures/​chang_credible.md Updates the plot_equilibria scatter call to use keyword arguments for marker size, colour, and style.

Review effort: Lite (adaptive)

@mmcky
mmcky merged commit 354faf5 into main Nov 22, 2026
10 checks passed
@mmcky
mmcky deleted the chang-credible-scatter-keywords branch November 22, 2026 10:15
mmcky added a commit to QuantEcon/lecture-dp that referenced this pull request Nov 22, 2026
chang_credible's scatter calls pass size, colour and marker by keyword (s=, c=, marker=), the same change as QuantEcon/lecture-python-advanced.myst#419. Matplotlib 3.11 marks those arguments keyword-only and warned on the positional form; the warnings are gone and the figures are byte-identical. Fully validated: fresh no-cache builds of this branch and of main, compared page by page.

Reviewed by @mmcky on GitHub, who passed it for merge in the infrastructure organiser session, after the organiser's fresh review.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mmcky added a commit to QuantEcon/lectures that referenced this pull request Nov 22, 2026
…python-advanced.myst#420

`tools/sync --update --pin-only advanced` moves advanced's pin from
63ef0be to ceed1b2. That range is two commits:
QuantEcon/lecture-python-advanced.myst#419, which changes
chang_credible.md, and QuantEcon/lecture-python-advanced.myst#420, which
changes only advanced's lectures/_static/quant-econ.bib. The pool's
chang_credible takes advanced's copy, so the nightly drift-check brings
#419's change in through its refresh pull request, reviewed as usual;
this pull request changes no pool lecture.

`tools/bib-merge --reconstruct --write` then regenerates
lectures/_static/quant-econ.bib. Its header now reads
advanced=8453bb3ec5a0ab0e and rulings 0fc43cfacdadb4e1 (body
84ba45fbccdab6e6). Two entries change, the two titles the rulings brace:
hansen1995discounted ({G}aussian; journal "IEEE Transactions on
Automatic Control") and SvenssonWilliams2009 ({DSGE}, {Markov}).

The branch took main (f63d746, #88) in a merge
commit first, so the header carries intro's re-seal too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
mmcky added a commit to QuantEcon/lectures that referenced this pull request Nov 23, 2026
)

Re-seals advanced's take rulings in sync/bib.yml for the copies QuantEcon/lecture-python-advanced.myst#420 wrote, and moves the pool's advanced pin from 63ef0be to ceed1b2, that pull request's merge. Eight rulings renew advanced's seal; two of them also set braced titles, so the capitals survive the sentence-case reference style: hansen1995discounted becomes "Discounted linear exponential quadratic {G}aussian control" in IEEE Transactions on Automatic Control, and SvenssonWilliams2009 braces {DSGE} and {Markov}. tools/bib-merge --reconstruct --write updated the merged bibliography: those two entries change, and the header reads advanced=8453bb3ec5a0ab0e, rulings 0fc43cfacdadb4e1, body 84ba45fbccdab6e6. The pin's range also holds QuantEcon/lecture-python-advanced.myst#419's chang_credible change, which the nightly refresh brings into the pool separately; this changes no pool lecture.

The two entries are lecture content: @mmcky reviewed this exact diff and chose "Merge it now" in the infrastructure organiser session, after the organiser's fresh review of a69e9eb and its own read of the full diff at 8d4a898. It lands before the nightly pool sync at 03:47Z.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mmcky pushed a commit to QuantEcon/lectures that referenced this pull request Nov 23, 2026
The nightly of 2026-11-23 re-copies 19 pool lectures whose canonical copy moved upstream: intermediate 12 (QuantEcon/lecture-python.myst#1144, QuantEcon/lecture-python.myst#1147 and QuantEcon/lecture-python.myst#1141), advanced 5 (QuantEcon/lecture-python-advanced.myst#419, QuantEcon/lecture-python-advanced.myst#421 and QuantEcon/lecture-python-advanced.myst#422) and intro 2 (QuantEcon/lecture-python-intro#876). In the merged bibliography only the header's jax input hash changes (QuantEcon/lecture-jax#377); its 1011 entries are unchanged. In sync/ledger.yml only pins and digests change.

Checked by mini:project-monorepo's recompute from a clean clone at the base, which gives the head's tree, and by the organiser's independent review: each lecture is byte-identical to its upstream copy at the new pin once the recorded asset rewrites are applied, no bibliography key is missing and no cross-reference is broken. The site-build, pool-check and drift-check runs on the head were green before merge.

Lecture content: reviewed by @mmcky ("Approve runs, then merge") in the organiser session, at head a815b36.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

1 inactive deployment
pull request — caa79003 Deployed Nov 22, 2026 by github-actions[bot]
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.

2 participants