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

Method test_quiver

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

Source from the content-addressed store, hash-verified

2707 self.ds = ds
2708
2709 def test_quiver(self) -> None:
2710 with figure_context():
2711 hdl = self.ds.isel(row=0, col=0).plot.quiver(x="x", y="y", u="u", v="v")
2712 assert isinstance(hdl, mpl.quiver.Quiver)
2713 with pytest.raises(ValueError, match=r"specify x, y, u, v"):
2714 self.ds.isel(row=0, col=0).plot.quiver(x="x", y="y", u="u")
2715
2716 with pytest.raises(ValueError, match=r"hue_style"):
2717 self.ds.isel(row=0, col=0).plot.quiver(
2718 x="x", y="y", u="u", v="v", hue="mag", hue_style="discrete"
2719 )
2720
2721 def test_facetgrid(self) -> None:
2722 with figure_context():

Callers

nothing calls this directly

Calls 3

figure_contextFunction · 0.85
quiverMethod · 0.80
iselMethod · 0.45

Tested by

no test coverage detected