Skip to content

Commit 1b8f2ca

Browse files
committed
fix tests
1 parent 5d7322c commit 1b8f2ca

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

oceans/datasets.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def woa_profile(lon, lat, variable="temperature", time_period="annual", resoluti
135135
... -143, 10, variable="temperature", time_period="annual", resolution="5"
136136
... )
137137
>>> fig, ax = plt.subplots(figsize=(2.25, 5))
138-
>>> woa.plot(ax=ax, y="depth")
138+
>>> l = woa.plot(ax=ax, y="depth")
139139
>>> ax.grid(True)
140140
>>> ax.invert_yaxis()
141141
@@ -185,7 +185,7 @@ def woa_subset(
185185
>>> woa = woa_subset(
186186
... *bbox, variable="temperature", time_period="annual", resolution="5"
187187
... )
188-
>>> woa.squeeze().sel(depth=0).plot(cmap=cm.lajolla)
188+
>>> cs = woa["t_mn"].sel(depth=0).plot(cmap=cm.lajolla)
189189
190190
>>> # Extract a square around the Mariana Trench averaging into a profile.
191191
>>> import matplotlib.pyplot as plt
@@ -206,12 +206,12 @@ def woa_subset(
206206
... *bbox, time_period=month, variable="temperature", resolution="1"
207207
... )
208208
... profile = area_weights_avg(woa)
209-
... profile.plot(ax=ax, y="depth", label=month, color=next(colors))
209+
... l = profile.plot(ax=ax, y="depth", label=month, color=next(colors))
210210
...
211211
>>> ax.grid(True)
212212
>>> ax.invert_yaxis()
213213
>>> leg = ax.legend(loc="lower left")
214-
>>> ax.set_ylim(200, 0)
214+
>>> _ = ax.set_ylim(200, 0)
215215
216216
"""
217217
import cf_xarray # noqa
@@ -287,7 +287,7 @@ def get_depth(lon, lat, tfile=None):
287287
lat.min() - offset,
288288
lat.max() + offset,
289289
]
290-
lons, lats, bathy = etopo_subset(bbox, tfile=tfile, smoo=False)
290+
lons, lats, bathy = etopo_subset(*bbox, tfile=tfile, smoo=False)
291291

292292
return get_profile(lons, lats, bathy, lon, lat, mode="nearest", order=3)
293293

@@ -303,10 +303,10 @@ def get_isobath(bbox, iso=-200, tfile=None, smoo=False):
303303
>>> import matplotlib.pyplot as plt
304304
>>> bbox = [-43, -30, -22, -17]
305305
>>> segments = get_isobath(bbox=bbox, iso=-200, smoo=True)
306-
>>> lon, lat, bathy = etopo_subset(bbox=bbox, smoo=True)
306+
>>> lon, lat, bathy = etopo_subset(*bbox, smoo=True)
307307
>>> fig, ax = plt.subplots()
308308
>>> cs = ax.pcolormesh(lon, lat, bathy)
309-
>>> for segment in segmentsz:
309+
>>> for segment in segments:
310310
... lines = ax.plot(segment[:, 0], segment[:, -1], "k", linewidth=2)
311311
...
312312

0 commit comments

Comments
 (0)