MCPcopy Index your code
hub / github.com/pydata/xarray / test_subplot_kws

Method test_subplot_kws

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

Source from the content-addressed store, hash-verified

655
656 @pytest.mark.slow
657 def test_subplot_kws(self) -> None:
658 a = easy_array((10, 15, 4))
659 d = DataArray(a, dims=["y", "x", "z"])
660 d.coords["z"] = list("abcd")
661 g = d.plot( # type: ignore[call-arg]
662 x="x",
663 y="y",
664 col="z",
665 col_wrap=2,
666 cmap="cool",
667 subplot_kws=dict(facecolor="r"),
668 )
669 for ax in g.axs.flat:
670 # mpl V2
671 assert ax.get_facecolor()[0:3] == mpl.colors.to_rgb("r")
672
673 @pytest.mark.slow
674 def test_plot_size(self) -> None:

Callers

nothing calls this directly

Calls 3

DataArrayClass · 0.90
easy_arrayFunction · 0.85
plotMethod · 0.80

Tested by

no test coverage detected