(self)
| 2303 | |
| 2304 | @pytest.mark.slow |
| 2305 | def test_colorbar(self) -> None: |
| 2306 | vmin = self.darray.values.min() |
| 2307 | vmax = self.darray.values.max() |
| 2308 | expected = np.array((vmin, vmax)) |
| 2309 | |
| 2310 | self.g.map_dataarray(xplt.imshow, "x", "y") |
| 2311 | |
| 2312 | for image in plt.gcf().findobj(mpl.image.AxesImage): |
| 2313 | assert isinstance(image, mpl.image.AxesImage) |
| 2314 | clim = np.array(image.get_clim()) |
| 2315 | assert np.allclose(expected, clim) |
| 2316 | |
| 2317 | assert 1 == len(find_possible_colorbars()) |
| 2318 | |
| 2319 | def test_colorbar_scatter(self) -> None: |
| 2320 | ds = Dataset({"a": (("x", "y"), np.arange(4).reshape(2, 2))}) |
nothing calls this directly
no test coverage detected