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

Method test_2d_line

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

Source from the content-addressed store, hash-verified

314 da.plot(x="t", hue="wrong_coord") # type: ignore[call-arg]
315
316 def test_2d_line(self) -> None:
317 with pytest.raises(ValueError, match=r"hue"):
318 self.darray[:, :, 0].plot.line()
319
320 self.darray[:, :, 0].plot.line(hue="dim_1")
321 self.darray[:, :, 0].plot.line(x="dim_1")
322 self.darray[:, :, 0].plot.line(y="dim_1")
323 self.darray[:, :, 0].plot.line(x="dim_0", hue="dim_1")
324 self.darray[:, :, 0].plot.line(y="dim_0", hue="dim_1")
325
326 with pytest.raises(ValueError, match=r"Cannot"):
327 self.darray[:, :, 0].plot.line(x="dim_1", y="dim_0", hue="dim_1")
328
329 def test_2d_line_accepts_legend_kw(self) -> None:
330 self.darray[:, :, 0].plot.line(x="dim_0", add_legend=False)

Callers

nothing calls this directly

Calls 1

lineMethod · 0.45

Tested by

no test coverage detected