Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
FIX: Ensure Locators on RadialAxis are always correctly wrapped#30174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
All the wrapping logic is now contained in RadialAxisClosesmatplotlib#30164 and rearchitectsmatplotlib#29798.
dstansby commentedJun 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
If you stick a |
diff --git a/lib/matplotlib/projections/polar.py b/lib/matplotlib/projections/polar.pyindex f20498b271..40f431aefb 100644--- a/lib/matplotlib/projections/polar.py+++ b/lib/matplotlib/projections/polar.py@@ -444,7 +444,7 @@ class RadialLocator(mticker.Locator): if _is_full_circle_rad(*self._axes.viewLim.intervalx): rorigin = self._axes.get_rorigin() * self._axes.get_rsign() if self._axes.get_rmin() <= rorigin:- return [tick for tick in self.base() if tick > rorigin]+ return [tick for tick in self.base() if tick >= rorigin] return self.base() def _zero_in_bounds(self): ☝️ fixes the test that's broken - seems like a sensible change to make, but I'm not sure if it breaks any other tests. |
timhoffm commentedJun 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for figuring out. Actually, there is no tick at the center in all thepolar examples. From a quick look, I don’t fully understand the code you pointed to, but given this is under the cross check:MATLAB does not do this. So it’s at least not something built in to match their behavior. |
All the wrapping logic is now done whenever a new locator is set in RadialAxis.
Closes#30164 and rearchitects#29798.