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

Method setUp

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

Source from the content-addressed store, hash-verified

2826class TestDatasetScatterPlots(PlotTestCase):
2827 @pytest.fixture(autouse=True)
2828 def setUp(self) -> None:
2829 das = [
2830 DataArray(
2831 np.random.randn(3, 3, 4, 4),
2832 dims=["x", "row", "col", "hue"],
2833 coords=[range(k) for k in [3, 3, 4, 4]],
2834 )
2835 for _ in [1, 2]
2836 ]
2837 ds = Dataset({"A": das[0], "B": das[1]})
2838 ds.hue.name = "huename"
2839 ds.hue.attrs["units"] = "hunits"
2840 ds.x.attrs["units"] = "xunits"
2841 ds.col.attrs["units"] = "colunits"
2842 ds.row.attrs["units"] = "rowunits"
2843 ds.A.attrs["units"] = "Aunits"
2844 ds.B.attrs["units"] = "Bunits"
2845 self.ds = ds
2846
2847 def test_accessor(self) -> None:
2848 from xarray.plot.accessor import DatasetPlotAccessor

Callers

nothing calls this directly

Calls 2

DataArrayClass · 0.90
DatasetClass · 0.90

Tested by

no test coverage detected