diff --git a/flopy/plot/map.py b/flopy/plot/map.py index 324901dffd..eb6b4d47c8 100644 --- a/flopy/plot/map.py +++ b/flopy/plot/map.py @@ -122,6 +122,11 @@ def plot_array(self, a, masked_values=None, **kwargs): # Use the model grid to pass back an array of the correct shape plotarray = self.mg.get_plottable_layer_array(a, self.layer) + # if masked_values are provided mask the plotting array + if masked_values is not None: + for mval in masked_values: + plotarray = np.ma.masked_values(plotarray, mval) + # add NaN values to mask plotarray = np.ma.masked_where(np.isnan(plotarray), plotarray)