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

Method test_convenient_facetgrid_4d

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

Source from the content-addressed store, hash-verified

699 @pytest.mark.slow
700 @pytest.mark.filterwarnings("ignore:tight_layout cannot")
701 def test_convenient_facetgrid_4d(self) -> None:
702 a = easy_array((10, 15, 2, 3))
703 d = DataArray(a, dims=["y", "x", "columns", "rows"])
704 g = d.plot(x="x", y="y", col="columns", row="rows") # type: ignore[call-arg]
705
706 assert_array_equal(g.axs.shape, [3, 2])
707 for ax in g.axs.flat:
708 assert ax.has_data()
709
710 with pytest.raises(ValueError, match=r"[Ff]acet"):
711 d.plot(x="x", y="y", col="columns", ax=plt.gca()) # type: ignore[call-arg]
712
713 def test_coord_with_interval(self) -> None:
714 """Test line plot with intervals."""

Callers

nothing calls this directly

Calls 4

DataArrayClass · 0.90
easy_arrayFunction · 0.85
plotMethod · 0.80
has_dataMethod · 0.80

Tested by

no test coverage detected