(self)
| 2719 | ) |
| 2720 | |
| 2721 | def test_facetgrid(self) -> None: |
| 2722 | with figure_context(): |
| 2723 | fg = self.ds.plot.quiver( |
| 2724 | x="x", y="y", u="u", v="v", row="row", col="col", scale=1, hue="mag" |
| 2725 | ) |
| 2726 | for handle in fg._mappables: |
| 2727 | assert isinstance(handle, mpl.quiver.Quiver) |
| 2728 | assert fg.quiverkey is not None |
| 2729 | assert "uunits" in fg.quiverkey.text.get_text() |
| 2730 | |
| 2731 | with figure_context(): |
| 2732 | fg = self.ds.plot.quiver( |
| 2733 | x="x", |
| 2734 | y="y", |
| 2735 | u="u", |
| 2736 | v="v", |
| 2737 | row="row", |
| 2738 | col="col", |
| 2739 | scale=1, |
| 2740 | hue="mag", |
| 2741 | add_guide=False, |
| 2742 | ) |
| 2743 | assert fg.quiverkey is None |
| 2744 | with pytest.raises(ValueError, match=r"Please provide scale"): |
| 2745 | self.ds.plot.quiver(x="x", y="y", u="u", v="v", row="row", col="col") |
| 2746 | |
| 2747 | @pytest.mark.parametrize( |
| 2748 | "add_guide, hue_style, legend, colorbar", |
nothing calls this directly
no test coverage detected