| 344 | assert plt.gca().get_xlabel() == "dim_1" |
| 345 | |
| 346 | def test_2d_line_accepts_hue_kw(self) -> None: |
| 347 | self.darray[:, :, 0].plot.line(hue="dim_0") |
| 348 | legend = plt.gca().get_legend() |
| 349 | assert legend is not None |
| 350 | assert legend.get_title().get_text() == "dim_0" |
| 351 | plt.cla() |
| 352 | self.darray[:, :, 0].plot.line(hue="dim_1") |
| 353 | legend = plt.gca().get_legend() |
| 354 | assert legend is not None |
| 355 | assert legend.get_title().get_text() == "dim_1" |
| 356 | |
| 357 | def test_2d_coords_line_plot(self) -> None: |
| 358 | lon, lat = np.meshgrid(np.linspace(-20, 20, 5), np.linspace(0, 30, 4)) |