Repository navigation
Honor set_rlabel_position on partial-wedge polar axes - #32539
mertkayacs wants to merge 1 commit into
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. |
PR summary
Closes #15835.
PolarAxes.drawreplaces the r-axis label transform with_yaxis_transformwhenever the axes shows a partial wedge, and that transform drops_r_label_positionentirely, soset_rlabel_positionsilently does nothing on wedge plots.This adds
_r_label_position_manual, set byset_rlabel_positionand cleared onclear(). When the position was set manually, the labels now use the same rlabel-aware transform as on a full circle,RadialTick.update_positionderives rotation and anchors from the rlabel angle, and the tick pad shifts along the rlabel ray (the existing_ThetaShiftmode'rlabel'). A manual position is honored even if it lies outside the wedge, as suggested in the issue. The default behavior is unchanged: without a manual position the labels still hug the wedge edges, so no existing plot changes.set_rgridsno longer re-callsset_rlabel_positionwhen noangleis passed, which would otherwise mark the position as manual without moving anything.AI Disclosure
I used AI agents to help trace the transform chain and to draft the fix and the test. I reviewed, understood and ran all of it myself before opening this PR.
PR quality check