Commit 7321ce13 authored by Florent Jaillet's avatar Florent Jaillet
Browse files

Handle NaN values correctly in tfplot()

parent bd89992d
......@@ -195,7 +195,7 @@ def tfplot(coef, step, yr, fs=None, dynrange=None, normalization='db',
# 'dynrange' parameter is handled by converting it into clim
# clim overrides dynrange, so do nothing if clim is already specified
if dynrange and not clim:
maxclim = np.max(coef)
maxclim = np.nanmax(coef)
clim = (maxclim - dynrange, maxclim)
# Handle clim by thresholding and cutting
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment