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 Oct 8, 2021
1 parent 6a3c616 commit f3c9315
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 @@ -2000,6 +2000,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 = super().pcolor(*args, **kwargs)

# Update the datalim for this pcolor.
Expand Down

0 comments on commit f3c9315

Please sign in to comment.