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

Method test_facetgrid_cmap

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

Source from the content-addressed store, hash-verified

1710 assert expected == actual
1711
1712 def test_facetgrid_cmap(self) -> None:
1713 # Regression test for GH592
1714 data = np.random.random(size=(20, 25, 12)) + np.linspace(-3, 3, 12)
1715 d = DataArray(data, dims=["x", "y", "time"])
1716 fg = d.plot.pcolormesh(col="time")
1717 # check that all color limits are the same
1718 assert len({m.get_clim() for m in fg._mappables}) == 1
1719 # check that all colormaps are the same
1720 assert len({m.get_cmap().name for m in fg._mappables}) == 1
1721
1722 def test_facetgrid_cbar_kwargs(self) -> None:
1723 a = easy_array((10, 15, 2, 3))

Callers

nothing calls this directly

Calls 3

DataArrayClass · 0.90
linspaceMethod · 0.80
pcolormeshMethod · 0.80

Tested by

no test coverage detected