Fix step histogram autoscaling [mpl compatibility]#252
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Exact gallery verification against Matplotlib 3.11: The middle column is the authoritative current-head union of #206, #240–#248, and #211. The right column applies this PR on top of that union. The histogram counts were already numerically correct; the compact The remaining inter-panel ylabel spacing visible in output 008 is independent grid-layout work, so I am keeping it out of this technical autoscale PR and treating it as a separate layout fix. |
Merging this PR will not alter performance
Comparing Footnotes
|

Summary
stairs(values, edges)entries contribute bin edges on x and histogram heights on yRoot cause
Axes.hist(..., histtype="step")correctly computed the bin counts, density, and weights, but stored the result as the compactstairs(values, edges)mark. Pyplot's entry scanner did not understand that reversed argument order and classified stairs-only panels as dataless, pinning both axes to the empty(0, 1)range. This clipped the real[-4, 4]distributions in Matplotlib gallerystatistics/histogram_normalization.pyfigures 7–8.Validation
550 passed, 65 skippedacrosstests/pyplotA Matplotlib / before / after comparison is attached in the PR comments.