You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Removing spines in polar plot causes distortion of the plot #30164
This is essentially the same issue as the one fixed by #29798, but uses set_yticks instead of set_rticks. I suspect that PolarAxes.set_yticks should get the same treatment (of wrapping into a RadialLocator); indeed, using set_rticks([]) works fine as of HEAD.
Actually, I think the proper solution must go deeper. In the end, this is a topic that should be handled within RadialAxis. The locator should always be wrapped in a RadialLocator, so I would say that set_major_locator should be overridden to ensure the wrapping.
but I'm unclear what the isDefault_majloc is doing and whether we need it. Also, this helper is called explicitly - do we still need that if RadialAxis.set_major_locator will do the wrapping? @QuLogic you seem to have introduced this in #9068 do you still remember?
Activity
anntzer commentedon Jun 12, 2025
This is essentially the same issue as the one fixed by #29798, but uses set_yticks instead of set_rticks. I suspect that PolarAxes.set_yticks should get the same treatment (of wrapping into a RadialLocator); indeed, using
set_rticks([])works fine as of HEAD.timhoffm commentedon Jun 13, 2025
Fundamentally, shouldn't we implment everything in
set_yticksand makeset_rticksonly a synonym of that?anntzer commentedon Jun 13, 2025
Yes, I would think so.
timhoffm commentedon Jun 13, 2025
Actually, I think the proper solution must go deeper. In the end, this is a topic that should be handled within
RadialAxis. The locator should always be wrapped in aRadialLocator, so I would say thatset_major_locatorshould be overridden to ensure the wrapping.There's already a helper function for wrapping:
matplotlib/lib/matplotlib/projections/polar.py
Lines 682 to 685 in f6b77d2
but I'm unclear what the
isDefault_majlocis doing and whether we need it. Also, this helper is called explicitly - do we still need that ifRadialAxis.set_major_locatorwill do the wrapping? @QuLogic you seem to have introduced this in #9068 do you still remember?FIX: Ensure Locators on RadialAxis are always correctly wrapped
FIX: Ensure Locators on RadialAxis are always correctly wrapped
Fix issue matplotlib#30164: Removing spines in polar plot causing dis…
Issue matplotlib#30164: Removing spines causes distortion of the plot
Fix issue matplotlib#30164: Removing spines from polar plot causing d…
Fix issue matplotlib#30164: Removing spines from polar causing distor…
FIX: Ensure Locators on RadialAxis are always correctly wrapped