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

Method test_streamline

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

Source from the content-addressed store, hash-verified

2790 self.ds = ds
2791
2792 def test_streamline(self) -> None:
2793 with figure_context():
2794 hdl = self.ds.isel(row=0, col=0).plot.streamplot(x="x", y="y", u="u", v="v")
2795 assert isinstance(hdl, mpl.collections.LineCollection)
2796 with pytest.raises(ValueError, match=r"specify x, y, u, v"):
2797 self.ds.isel(row=0, col=0).plot.streamplot(x="x", y="y", u="u")
2798
2799 with pytest.raises(ValueError, match=r"hue_style"):
2800 self.ds.isel(row=0, col=0).plot.streamplot(
2801 x="x", y="y", u="u", v="v", hue="mag", hue_style="discrete"
2802 )
2803
2804 def test_facetgrid(self) -> None:
2805 with figure_context():

Callers

nothing calls this directly

Calls 3

figure_contextFunction · 0.85
streamplotMethod · 0.80
iselMethod · 0.45

Tested by

no test coverage detected