| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
test_polar_alignment fails. The tick 0.0 is now missing but I don't understand how the change is affecting it. |
Sorry, something went wrong.
|
If you stick a print(fig.axes[0].yaxis.get_major_locator()) at the end of that test, before this PR it gives a FixedLocator, but after it gives a RadialLocator. Makes sense, but I guess that might be the root cause of the failing image test. |
Sorry, something went wrong.
diff --git a/lib/matplotlib/projections/polar.py b/lib/matplotlib/projections/polar.py
index 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. |
Sorry, something went wrong.
|
Thanks for figuring out. Actually, there is no tick at the center in all the polar examples. From a quick look, I don’t fully understand the code you pointed to, but given this is under the is_full_circle_rad condition, it might be intentional to leave out the tick at the center. Will need to have a closer look at context conditions and history of that code. cross check: MATLAB does not do this. So it’s at least not something built in to match their behavior. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, other than fixing the test.
Sorry, something went wrong.
All the wrapping logic is now contained in RadialAxis Closes matplotlib#30164 and rearchitects matplotlib#29798.
|
I've simply updated the refrence image. As said above, other radial plots don't have the center 0 either. Therefore I claim the reference image was wrong. If we wanted to add the 0 back in, that'd need to be a systematic appoach. |
Sorry, something went wrong.
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
git checkout v3.10.x git pull
git cherry-pick -x -m1 1663e9af1b63409f1a98b8ff6bc0c5c07b47054c
git commit -am 'Backport PR #30174: FIX: Ensure Locators on RadialAxis are always correctly wrapped'
git push YOURFORK v3.10.x:auto-backport-of-pr-30174-on-v3.10.x
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the Still Needs Manual Backport label once the PR gets merged. If these instructions are inaccurate, feel free to suggest an improvement. |
Sorry, something went wrong.
|
Not worth a manual backport. - I anticipate that 3.11 will be released in the not too far future, and a possible 3.10.4 will not be much earlier than that. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
All the wrapping logic is now done whenever a new locator is set in RadialAxis.
Closes #30164 and rearchitects #29798.