-
Notifications
You must be signed in to change notification settings - Fork 12
Fix DMS not set on some projections #293
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 our terms of service and privacy 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?
Conversation
Some baselines will probable fail (but maybe not). Will add a test. |
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures degree-minute-second (DMS) formatting is consistently applied to projections that require it.
- Added a test to verify DMS formatting on the Mercator projection.
- Removed explicit gridline formatter overrides so axis formatters can propagate DMS formatting.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
ultraplot/tests/test_geographic.py | Add test_dms_used_for_mercator to validate DMS formatting |
ultraplot/axes/geo.py | Remove explicit gl.xformatter /gl.yformatter assignments |
Comments suppressed due to low confidence (2)
ultraplot/tests/test_geographic.py:864
- The new test only verifies longitude formatting (
xformatter
). To fully cover DMS behavior, add assertions for latitude formatting usinggridlines_major.yformatter
on thelat
ticks.
a = ax[0].gridlines_major.xformatter(tick)
ultraplot/axes/geo.py:1708
- By removing the explicit assignment of
gl.xformatter
andgl.yformatter
, gridlines may no longer pick up the DMS formatter from the axis. Consider reintroducing these assignments (after the axis formatter is configured) so gridlines use the correct DMS formatter.
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change confuses me. There were no cases where the code that's been removed was needed?
Actually you are right, I thought I added this but that's not true will do some more searching why it is not working. |
It's a bit strange when I edit line 244 and remove the merc projector it is set to false and it works as it should for the mercator projection but it does not make sense since use_dms will be set to false. |
I will wait before the issuer gives some clarity. The PR now only contains a test. |
Addresses #292 where DMS is not set for some axes that should have it set.