Skip to content

Commit

Permalink
don't take values twice for masked arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Oct 28, 2021
1 parent 19b5c68 commit 820c0fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions xarray/plot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,10 +1161,9 @@ def newplotfunc(
# better to pass the ndarrays directly to plotting functions
xval = xval.to_numpy()
yval = yval.to_numpy()
zarray = darray.as_numpy()

# Pass the data as a masked ndarray too
zval = zarray.to_masked_array(copy=False)
# Pass the data as a masked ndarray too
zval = darray.to_masked_array(copy=False)

# Replace pd.Intervals if contained in xval or yval.
xplt, xlab_extra = _resolve_intervals_2dplot(xval, plotfunc.__name__)
Expand Down

0 comments on commit 820c0fb

Please sign in to comment.