Conversation
|
Thank you for opening your first PR into Matplotlib! If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process. You can also join us on discourse chat for real-time discussion. For details on testing, writing docs, and our review process, please see the developer guide. We strive to be a welcoming and open project. Please follow our Code of Conduct. |
|
@rcomer The issue is that axisartist draws a separate label whose font size wasn’t following set_xlabel / set_ylabel. The fix makes it inherit that size while preserving explicit settings on the axisartist label. The font-cache change stores a snapshot to avoid retaining closed figures |
PR summary
Fixes #28124.
Make axisartist axis labels follow the font size set through
set_xlabelandset_ylabel. Direct font settings on individual axisartist labels still take precedence. Font lookup caches store snapshots so inherited font properties do not retain closed figures.Regression tests compare rendered figures and cover explicit overrides, mutable font properties, copying, bounding boxes, and figure lifetime. The previous attempt in #31155 is closed and unmerged.
Testing
AI Disclosure
Used Codex for implementation and testing.