Skip to content

Commit 186b852

Browse files
committed
filter out nans when computing min/max
1 parent 0bc5777 commit 186b852

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

metplotpy/plots/contour/contour.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ def _draw_series_pcolormesh(self, series: Series, ax) -> None:
257257
if len(ylim) > 0:
258258
vmin, vmax = float(ylim[0]), float(ylim[1])
259259
else:
260-
vmin = np.min(series.series_points['z'])
261-
vmax = np.max(series.series_points['z'])
260+
vmin = np.nanmin(series.series_points['z'])
261+
vmax = np.nanmax(series.series_points['z'])
262262

263263
locator = ticker.MaxNLocator(nbins=self.config_obj.contour_intervals, steps=[1, 2, 5, 10])
264264
boundaries = locator.tick_values(vmin, vmax)

0 commit comments

Comments
 (0)