Skip to content

Commit

Permalink
Fix(PlotMapView.plot_array()): fix value masking code for masked_valu…
Browse files Browse the repository at this point in the history
…es parameter (#1026)
  • Loading branch information
jlarsen-usgs committed Dec 3, 2020
1 parent 0f7a0f0 commit 7cb429f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flopy/plot/map.py
Expand Up @@ -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)

Expand Down

0 comments on commit 7cb429f

Please sign in to comment.