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

Method test_colorbar_scatter

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

Source from the content-addressed store, hash-verified

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))})
2321 fg: xplt.FacetGrid = ds.plot.scatter(x="a", y="a", row="x", hue="a")
2322 cbar = fg.cbar
2323 assert cbar is not None
2324 assert hasattr(cbar, "vmin")
2325 assert cbar.vmin == 0
2326 assert hasattr(cbar, "vmax")
2327 assert cbar.vmax == 3
2328
2329 @pytest.mark.slow
2330 def test_empty_cell(self) -> None:

Callers

nothing calls this directly

Calls 3

DatasetClass · 0.90
arangeMethod · 0.80
scatterMethod · 0.45

Tested by

no test coverage detected