Add degrees and decimal minutes tick formatting mode - #2740
DavidVadnais wants to merge 1 commit into
Conversation
greglucas
left a comment
There was a problem hiding this comment.
There is a lot of extra code here, I think we should try to work this into what we already have instead if possible. We should also accept a dms="d", "dm", "dms" for any of the versions if someone wants degrees alone we don't want to have to write a bunch of new helpers.
I think this can be done within the formatting checks. We should always just use the value, deg, mn, sec = self._get_dms(abs(value)) Maybe we could add the checks into that function and return sec=0 if self._dms = "dm" which would then skip the seconds formatting. Similar to the minutes and degrees section.
19201d6 to
906ec40
Compare
906ec40 to
a29a855
Compare
| @@ -120,8 +133,13 @@ def _get_dms(self, x): | |||
| """ | |||
| self._precision = 6 | |||
There was a problem hiding this comment.
I think this should just be deleted since it overwrites the default 5 for seemingly no reason.
a29a855 to
e99f6dd
Compare

Rationale
Fixes: #944
Example code
Example output
Implications
I think the worst part of this PR is the change from
dms: bool, optionaltodms: bool or str, optionalI'm interested in doing this differently but I'm not sure what you'd suggest? This implementation is backwards compatible which is good.