| 252 | da.plot(y="f") # type: ignore[call-arg] |
| 253 | |
| 254 | def test_multiindex_level_as_coord(self) -> None: |
| 255 | da = xr.DataArray( |
| 256 | np.arange(5), |
| 257 | dims="x", |
| 258 | coords=dict(a=("x", np.arange(5)), b=("x", np.arange(5, 10))), |
| 259 | ) |
| 260 | da = da.set_index(x=["a", "b"]) |
| 261 | |
| 262 | for x in ["a", "b"]: |
| 263 | h = da.plot(x=x)[0] # type: ignore[call-arg] |
| 264 | assert_array_equal(h.get_xdata(), da[x].values) |
| 265 | |
| 266 | for y in ["a", "b"]: |
| 267 | h = da.plot(y=y)[0] # type: ignore[call-arg] |
| 268 | assert_array_equal(h.get_ydata(), da[y].values) |
| 269 | |
| 270 | # Test for bug in GH issue #2725 |
| 271 | def test_infer_line_data(self) -> None: |