MCPcopy Index your code
hub / github.com/pydata/xarray / test_can_set_vmin_vmax

Method test_can_set_vmin_vmax

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

Source from the content-addressed store, hash-verified

2383
2384 @pytest.mark.slow
2385 def test_can_set_vmin_vmax(self) -> None:
2386 vmin, vmax = 50.0, 1000.0
2387 expected = np.array((vmin, vmax))
2388 self.g.map_dataarray(xplt.imshow, "x", "y", vmin=vmin, vmax=vmax)
2389
2390 for image in plt.gcf().findobj(mpl.image.AxesImage):
2391 assert isinstance(image, mpl.image.AxesImage)
2392 clim = np.array(image.get_clim())
2393 assert np.allclose(expected, clim)
2394
2395 @pytest.mark.slow
2396 def test_vmin_vmax_equal(self) -> None:

Callers

nothing calls this directly

Calls 1

map_dataarrayMethod · 0.80

Tested by

no test coverage detected