Skip to content

Commit 887e737

Browse files
github-actions[bot]rcomer
authored andcommitted
Cartopy 0.19 updates (SciTools#4128)
1 parent 707bda7 commit 887e737

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

lib/iris/plot.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,18 @@ def contourf(cube, *args, **kwargs):
10731073
# any boundary shift.
10741074
zorder = result.collections[0].zorder - 0.1
10751075
axes = kwargs.get("axes", None)
1076+
1077+
# Workaround for cartopy#1780. We do not want contour to shrink
1078+
# extent.
1079+
if axes is None:
1080+
_axes = plt.gca()
1081+
else:
1082+
_axes = axes
1083+
1084+
# Subsequent calls to dataLim.update_from_data_xy should not ignore
1085+
# current extent.
1086+
_axes.dataLim.ignore(False)
1087+
10761088
contour(
10771089
cube,
10781090
levels=levels,

lib/iris/tests/results/imagerepo.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@
260260
"iris.tests.test_mapping.TestLowLevel.test_simple.0": [
261261
"https://scitools.github.io/test-iris-imagehash/images/v4/eae0943295154bcc844e6c314fb093ce7bc7c4b3a4307bc4916f3f316ed2b4ce.png",
262262
"https://scitools.github.io/test-iris-imagehash/images/v4/faa0e55c855fdce7857a1ab16a85a50c3ea1e55e856658a5c11837096e8fe17a.png",
263-
"https://scitools.github.io/test-iris-imagehash/images/v4/faa0e55c855fdce7857a1ab16a85a50c36a1e55e854658b5c13837096e8fe17a.png"
263+
"https://scitools.github.io/test-iris-imagehash/images/v4/faa0e55c855fdce7857a1ab16a85a50c36a1e55e854658b5c13837096e8fe17a.png",
264+
"https://scitools.github.io/test-iris-imagehash/images/v4/faa0e558855fd9e7857a1ab16a85a51d36a1e55a854e58a5c13837096e8fe17a.png"
264265
],
265266
"iris.tests.test_mapping.TestMappingSubRegion.test_simple.0": [
266267
"https://scitools.github.io/test-iris-imagehash/images/v4/bd913e01d07ee07e926e87876f8196c1e0d36967393c1f181e2c3cb8b0f960d7.png",
@@ -1059,4 +1060,4 @@
10591060
"https://scitools.github.io/test-iris-imagehash/images/v4/82fe81987fdf77ffe0002addd4002805dd28df67d9a9d4625bfddc209841de20.png",
10601061
"https://scitools.github.io/test-iris-imagehash/images/v4/82fa80997f547799a0037a00d52f0956ddaf9f7e98a1816e09f5d8260bfffe00.png"
10611062
]
1062-
}
1063+
}

0 commit comments

Comments
 (0)