Skip to content

Commit 24258ad

Browse files
committed
Make sure passed lsmask is not the same as cached mask
1 parent fb711e3 commit 24258ad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/mpl_toolkits/basemap/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3902,8 +3902,11 @@ def drawlsmask(self,land_color="0.8",ocean_color="w",lsmask=None,
39023902
# or from plt.gca().
39033903
ax = kwargs.pop('ax', None) or self._check_ax()
39043904
# Clear saved lsmask is new lsmask is passed
3905-
if lsmask is not None or lsmask_lons is not None or lsmask_lats is not None:
3906-
self.lsmask = None
3905+
if lsmask is not None or lsmask_lons is not None \
3906+
or lsmask_lats is not None:
3907+
# Make sure passed lsmask is not the same as cached mask
3908+
if lsmask != self.lsmask:
3909+
self.lsmask = None
39073910
# if lsmask,lsmask_lons,lsmask_lats keywords not given,
39083911
# read default land-sea mask in from file.
39093912
if lsmask is None or lsmask_lons is None or lsmask_lats is None:

0 commit comments

Comments
 (0)