diff --git a/xarray/tests/test_plot.py b/xarray/tests/test_plot.py index 4ca54be5819..6bb37674a34 100644 --- a/xarray/tests/test_plot.py +++ b/xarray/tests/test_plot.py @@ -3344,24 +3344,30 @@ def test_plot1d_functions( plotfunc: str, ) -> None: """Test plot1d function. Merge with TestPlot1D eventually.""" - ds = xr.tutorial.scatter_example_dataset() + import matplotlib.pyplot as plt + + ds = xr.tutorial.scatter_example_dataset(seed=42) - extra_coords = [v for v in [x, hue, _size] if v is not None] + # extra_coords = [v for v in [x, hue, _size] if v is not None] - # Base coords: - coords = dict(ds.coords) + # # Base coords: + # coords = dict(ds.coords) - # Add extra coords to the DataArray: - coords.update({v: ds[v] for v in extra_coords}) + # # Add extra coords to the DataArray: + # coords.update({v: ds[v] for v in extra_coords}) - darray = xr.DataArray(ds[y], coords=coords) + # darray = xr.DataArray(ds[y], coords=coords) with figure_context(): - getattr(darray.plot, plotfunc)( + # plt.close("all") + getattr(ds.plot, plotfunc)( x=x, + y=y, z=z, hue=hue, _size=_size, + row=row, + col=col, add_legend=add_legend, add_colorbar=add_colorbar, )