Skip to content

Commit

Permalink
Merge pull request SciTools#1672 from emsterr/change_dms_hemisphere_o…
Browse files Browse the repository at this point in the history
…rder

change hemisphere location i gridlines labels.
  • Loading branch information
greglucas authored Dec 18, 2020
2 parents a3ce915 + 64086fe commit aecf80a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/cartopy/mpl/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _format_value(self, value, original_value):
label = self._format_minutes(mn) + label

if not self._auto_hide_degrees or not label:
label = sign + self._format_degrees(deg) + hemisphere + label
label = sign + self._format_degrees(deg) + label + hemisphere

return label

Expand Down
6 changes: 3 additions & 3 deletions lib/cartopy/tests/mpl/test_ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ def test_LongitudeFormatter_small_numbers_180():

@pytest.mark.parametrize("test_ticks,expected",
[pytest.param([-3.75, -3.5],
["3\u00B0W45'", "3\u00B0W30'"],
["3\u00B045'W", "3\u00B030'W"],
id='minutes_no_hide'),
pytest.param([-3.5, -3.],
["30'", "3\u00B0W"],
id='minutes_hide'),
pytest.param([-3. - 2 * ONE_MIN - 30 * ONE_SEC],
["3\u00B0W2'30''"],
["3\u00B02'30''W"],
id='seconds'),
])
def test_LongitudeFormatter_minutes_seconds(test_ticks, expected):
Expand Down Expand Up @@ -250,7 +250,7 @@ def test_LongitudeFormatter_minutes_seconds_direction_label(test_ticks,

@pytest.mark.parametrize("test_ticks,expected",
[pytest.param([-3.75, -3.5],
["3\u00B0S45'", "3\u00B0S30'"],
["3\u00B045'S", "3\u00B030'S"],
id='minutes_no_hide'),
])
def test_LatitudeFormatter_minutes_seconds(test_ticks, expected):
Expand Down

0 comments on commit aecf80a

Please sign in to comment.