Skip to content

Commit

Permalink
add a test for scatter colorbar extend (#7616)
Browse files Browse the repository at this point in the history
* add a test for scatter colorbar extend

* fix mypy issues
  • Loading branch information
headtr1ck authored Mar 13, 2023
1 parent 4faecb4 commit 9bd9044
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions xarray/tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2110,6 +2110,14 @@ def test_colorbar(self) -> None:

assert 1 == len(find_possible_colorbars())

def test_colorbar_scatter(self) -> None:
ds = Dataset({"a": (("x", "y"), np.arange(4).reshape(2, 2))})
fg: xplt.FacetGrid = ds.plot.scatter(x="a", y="a", row="x", hue="a")
cbar = fg.cbar
assert cbar is not None
assert cbar.vmin == 0
assert cbar.vmax == 3

@pytest.mark.slow
def test_empty_cell(self) -> None:
g = xplt.FacetGrid(self.darray, col="z", col_wrap=2)
Expand Down

0 comments on commit 9bd9044

Please sign in to comment.