Skip to content

Commit bf4b307

Browse files
authored
updates for Cartopy 0.19 (#4128)
1 parent b7b00d7 commit bf4b307

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
@@ -1087,6 +1087,18 @@ def contourf(cube, *args, **kwargs):
10871087
# any boundary shift.
10881088
zorder = result.collections[0].zorder - 0.1
10891089
axes = kwargs.get("axes", None)
1090+
1091+
# Workaround for cartopy#1780. We do not want contour to shrink
1092+
# extent.
1093+
if axes is None:
1094+
_axes = plt.gca()
1095+
else:
1096+
_axes = axes
1097+
1098+
# Subsequent calls to dataLim.update_from_data_xy should not ignore
1099+
# current extent.
1100+
_axes.dataLim.ignore(False)
1101+
10901102
contour(
10911103
cube,
10921104
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",
@@ -1047,4 +1048,4 @@
10471048
"https://scitools.github.io/test-iris-imagehash/images/v4/82fe81987fdf77ffe0002addd4002805dd28df67d9a9d4625bfddc209841de20.png",
10481049
"https://scitools.github.io/test-iris-imagehash/images/v4/82fa80997f547799a0037a00d52f0956ddaf9f7e98a1816e09f5d8260bfffe00.png"
10491050
]
1050-
}
1051+
}

0 commit comments

Comments
 (0)