Skip to content

Commit

Permalink
FIX: Handle shading argument with older MPL versions
Browse files Browse the repository at this point in the history
  • Loading branch information
greglucas committed Sep 24, 2021
1 parent af31e86 commit edb4439
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/cartopy/mpl/geoaxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2004,6 +2004,10 @@ def pcolor(self, *args, **kwargs):
# Add in an argument checker to handle Matplotlib's potential
# interpolation when coordinate wraps are involved
args, kwargs = self._wrap_args(*args, **kwargs)
if matplotlib.__version__ < "3.3":
# MPL 3.3 introduced the shading option, and it isn't
# handled before that for pcolor calls.
kwargs.pop('shading', None)
result = matplotlib.axes.Axes.pcolor(self, *args, **kwargs)

# Update the datalim for this pcolor.
Expand Down

0 comments on commit edb4439

Please sign in to comment.