Batch multiblock figure: carry the batch colours into the parity panel - #94
Merged
Merged
Conversation
… figure The super-score panel marks batches 13 (orange), 5 and 7 (aqua), and the prose reads all three together. The parity panel beside it marked only batch 13, so batches 5 and 7 were indistinguishable from the other 43 points and the reader could not see how the two batches that sit among the abnormal group are actually fitted. parity_plot already takes a highlight dict, so the three now carry the same colours in both panels. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXthGpHLQFfGubBiKFtGAE
The parity panel drew every batch as a plain dark-blue dot, so a panel sitting beside a score plot coded by the plant's classification used a different visual language for the same 46 batches. Only the highlighted batches shared a colour, and even those lost their class marker. parity_plot now takes the same groups and group_styles the score plots take, and delegates its scatter to group_scatter, so colour, marker shape and size come from one place. The class legend is suppressed on the parity panel, since the score plot beside it already names the three classes. In the batch multiblock figure the right panel now reads as the left one does, and the coding shows something the plain dots hid: the batches classed high in residual solvent all sit at the high-observed end and are fitted below the line. The SBR parity panels pass no groups, so they keep plain dots and are unchanged apart from the shared marker size (28 rather than a local 26) and edge width. Their labels, error entries and bands are as before, and check_labels.py reports no collisions anywhere. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXthGpHLQFfGubBiKFtGAE
…cross Two figure changes from review. The block-score panels asserted that four batches classed good sit among the abnormal ones in the trajectory block, and left the reader to see it. Each batch is now joined by a faint line to the average point of the group it is placed with, and a cross marks the two averages, so the rule behind the reading is on the figure: in the trajectory block the four reach across to the abnormal group, and in both initial-condition blocks they reach to the good one. The SBR influence plot drew every batch at the same size, beside a score plot whose marker areas carry the squared SPE. A reader could not match a batch between the pair. influence_plot now takes the same sizes argument and scales the areas the same way, so the two faulty batches are the smallest markers on both figures and batch 8 the largest. check_labels.py reports no collisions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXthGpHLQFfGubBiKFtGAE
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.
Follows #93, from review of the FMC page.
The super-score panel of
batch-case-fmc-batch-mbpls.pngmarks batches 13 (orange), 5 and 7 (aqua), and the chapter reads all three together: batch 13 at the low end of the first component, batches 5 and 7 on the other side among the batches classed abnormal although both were classed good.The observed-against-fitted panel beside it marked only batch 13. Batches 5 and 7 were indistinguishable from the other 43 points, so the reader could see where those two sit in the score plot but not how the model actually fits them.
A second commit takes it further, after review: the whole panel used a different visual language from the score plot beside it, drawing all 46 batches as plain dark-blue dots where the score plot codes them by the plant's classification, and even the highlighted batches lost their class marker.
parity_plotnow accepts the samegroupsandgroup_stylesthe score plots take, and delegates its scatter togroup_scatter, so colour, marker shape and size come from one place. The class legend is suppressed on the parity panel, since the score plot beside it already names the three classes.What the coding shows
With the classes drawn, something the plain dots hid becomes visible: all seven batches classed high in residual solvent sit at the top of the observed range and every one is fitted below the line, by 0.58 on average where the attribute spans 1.41. The other two classes scatter evenly about the line, at +0.03 and +0.10.
That is shrinkage, not a defect: two components describing under half of the quality block pull the extremes back towards the middle. The book page gains a sentence saying so, with the count and both figures printed in the code block and echoed in a comment so the checker compares them.
Verification
batch-case-fmc-batch-mbpls.pngandbatch-case-sbr-observed-vs-fitted.pngdiffer.check_labels.pyreports no label running off a figure, intruding into a marker, landing on another label or sitting under a legend.make check-code-fileon the FMC page runs the chapter up to it: 71 blocks, all passed with--strict-output.make textis clean. The caption, alt text and new sentence are in the matching pid-book commits on #273.One thing left for the author to decide
Orange carries two meanings inside this one figure: batch 13 in the left panel, and the super VIP bar series in the middle panel. That is the same kind of collision the DuPont page was corrected for in #92, where one meaning per colour was applied across the page. It is arguably milder here, since the two panels encode different kinds of entity (batches against measures) and each has its own legend.
Not changed, because it restyles a panel that was not under review. If it should be fixed, the middle panel's second bar colour is the thing to change, and
MAGENTAis unused on this page.🤖 Generated with Claude Code
https://claude.ai/code/session_01LXthGpHLQFfGubBiKFtGAE
Generated by Claude Code
Generated by Claude Code