diff --git a/lib/iris/plot.py b/lib/iris/plot.py index 349f1fea10..b0159af9d6 100644 --- a/lib/iris/plot.py +++ b/lib/iris/plot.py @@ -1073,6 +1073,18 @@ def contourf(cube, *args, **kwargs): # any boundary shift. zorder = result.collections[0].zorder - 0.1 axes = kwargs.get("axes", None) + + # Workaround for cartopy#1780. We do not want contour to shrink + # extent. + if axes is None: + _axes = plt.gca() + else: + _axes = axes + + # Subsequent calls to dataLim.update_from_data_xy should not ignore + # current extent. + _axes.dataLim.ignore(False) + contour( cube, levels=levels,