MCPcopy
hub / github.com/pydata/xarray / test2d_1d_2d_coordinates_contourf

Method test2d_1d_2d_coordinates_contourf

xarray/tests/test_plot.py:402–412  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

400 assert self.contourf_called(a.plot.contourf)
401
402 def test2d_1d_2d_coordinates_contourf(self) -> None:
403 sz = (20, 10)
404 depth = easy_array(sz)
405 a = DataArray(
406 easy_array(sz),
407 dims=["z", "time"],
408 coords={"depth": (["z", "time"], depth), "time": np.linspace(0, 1, sz[1])},
409 )
410
411 a.plot.contourf(x="time", y="depth")
412 a.plot.contourf(x="depth", y="time")
413
414 def test2d_1d_2d_coordinates_pcolormesh(self) -> None:
415 # Test with equal coordinates to catch bug from #5097

Callers

nothing calls this directly

Calls 4

DataArrayClass · 0.90
easy_arrayFunction · 0.85
linspaceMethod · 0.80
contourfMethod · 0.80

Tested by

no test coverage detected