Caption the figures in prob_dist and observed_distributions - #816
Merged
Conversation
The manual asks every code-generated figure to carry a caption via mystnb metadata. prob_dist had 3 of 20 and observed_distributions none of 20, the latter being an oversight in #811. Adds 35 captions with fig: names for numref, following the manual: sentence case, six words or fewer, descriptive names. Two figures are deliberately left bare, one in each lecture. Both sit inside solution directives, where a caption wraps the image in a LaTeX float and breaks the PDF build with "Not in outer par mode". Also fixes a bug found while captioning. The CDF figure in the lognormal section was built from scipy.stats.norm rather than scipy.stats.lognorm, so it had been drawing normal CDFs under a lognormal heading, and it looped over sigma alone with mu pinned to 1 while the density figure above it varied both. It now uses lognorm over the same (mu, sigma) pairs as that figure, so the two are a matched pair and the curves start at zero as a distribution on the positive half-line should. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This was referenced Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The manual asks every code-generated figure to carry a caption via
mystnbmetadata. These two lectures were well short of that:prob_distobserved_distributionsThe
observed_distributionsgap is an oversight in #811 — I wrote that lecture without any captions at all.35 captions added, with
fig:names fornumref, following the manual's rules: sentence case, six words or fewer, descriptive names.Two figures deliberately left bare
One in each lecture, both inside
solutiondirectives. The manual is explicit that captions there wrap the image in a LaTeX float and break the PDF build withNot in outer par mode, so those cells stay uncaptioned.A bug found while captioning
The CDF figure in the lognormal section was built from
scipy.stats.norm:So it had been drawing normal CDFs all along. It also pinned$\mu = 1$ and looped over $\sigma$ alone, while the density figure directly above it varies both parameters — so the two figures did not correspond.
It now uses$(\mu, \sigma)$ pairs as the density figure, making them a matched pair, and the curves start at zero as a distribution on the positive half-line should.
lognormover the sameI found this because a caption forced the question of what the figure actually showed. Fixing it changes one existing figure's output, which is why it is called out here rather than buried in a mechanical sweep.
Both lectures execute end to end.
🤖 Generated with Claude Code