Repository navigation
Conversation
Give every code-generated figure in the main text a mystnb caption and name, and set lw=2 on line charts, per the figures page of the style guide. Figures inside exercises and solutions are left uncaptioned so the PDF build is unaffected. See #1080 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Three captioned cells render a print plus a figure under the caption float, and verifying the resulting HTML/PDF figure output requires a full lecture build and human preview that cannot be done here.
0 open findings
What changed in this PR
This PR applies two conventions from the QuantEcon style guide's figures page to three lectures (ak2, ak_aiyagari, two_computation), following up on the style pass in #1078 and addressing #1080. It adds mystnb: figure: caption metadata (each with a unique name for numref referencing) to code-generated figures in the main text, and sets lw=2 on line charts. There are no code logic changes.
Changes:
- Added figure captions with unique
namelabels to 24 code cells across the three lectures (ak2: 8, ak_aiyagari: 7, two_computation: 9), all placed on{code-cell}directives in main text and kept out ofexercise/solutiondirectives to avoid LaTeX float PDF build issues. - Set
lw=2on line charts (including theplot()methods ofClosedFormTrans/AK2, verbose iteration plots, and the openingtwo_computationfigures), while deliberately leaving dashed reference lines (45-degree lines,hlines) at default width. - Three captioned cells (
ak2.simulate(..., verbose=True)and the twopath_iteration(..., verbose=True)cells) produce a convergence print plus a figure, so their caption sits under mixed output.
| File | Description |
|---|---|
lectures/ak2.md |
Adds 8 figure captions with names and lw=2 on all line charts, including ClosedFormTrans/AK2 plot() methods and verbose iteration plots. |
lectures/ak_aiyagari.md |
Adds 7 figure captions with names and lw=2 on policy, transition, and path_iteration verbose plots; dashed 45-degree/reference lines unchanged. |
lectures/two_computation.md |
Adds 9 figure captions with names and lw=2 on the four opening line charts that lacked it. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
📖 Netlify Preview Ready!Preview URL: https://pr-1081--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild Info
|
Addresses #1080, the figure follow-ups from the style pass on #1078.
Captions. Every code-generated figure in the main text of the three lectures now carries
mystnb: figure:caption metadata with aname, so each renders as "Fig N. caption" and can be referenced withnumref. Figures insideexerciseandsolutiondirectives are deliberately left uncaptioned, since a caption wraps the image in a LaTeX float and breaks the PDF build.ak2ak_aiyagaritwo_computationLine widths.
lw=2is now set on every line chart inak2andak_aiyagari, including theplot()methods ofClosedFormTransandAK2and the verbose plots inpath_iteration, and on the four opening figures oftwo_computationthat lacked it. Dashed reference lines such as the 45-degree line keep their default width.No code logic changes. One thing worth a look in the preview: the
ak2.simulate(..., verbose=True)cell inak2and the twopath_iteration(..., verbose=True)cells inak_aiyagariprint a convergence line as well as a figure, so their captions sit under a mixed output.🤖 Generated with Claude Code