| 2771 | class TestDatasetStreamplotPlots(PlotTestCase): |
| 2772 | @pytest.fixture(autouse=True) |
| 2773 | def setUp(self) -> None: |
| 2774 | das = [ |
| 2775 | DataArray( |
| 2776 | np.random.randn(3, 4, 2, 2), |
| 2777 | dims=["x", "y", "row", "col"], |
| 2778 | coords=[range(k) for k in [3, 4, 2, 2]], |
| 2779 | ) |
| 2780 | for _ in [1, 2] |
| 2781 | ] |
| 2782 | ds = Dataset({"u": das[0], "v": das[1]}) |
| 2783 | ds.x.attrs["units"] = "xunits" |
| 2784 | ds.y.attrs["units"] = "yunits" |
| 2785 | ds.col.attrs["units"] = "colunits" |
| 2786 | ds.row.attrs["units"] = "rowunits" |
| 2787 | ds.u.attrs["units"] = "uunits" |
| 2788 | ds.v.attrs["units"] = "vunits" |
| 2789 | ds["mag"] = np.hypot(ds.u, ds.v) |
| 2790 | self.ds = ds |
| 2791 | |
| 2792 | def test_streamline(self) -> None: |
| 2793 | with figure_context(): |