def test__infer_interval_breaks_logscale_invalid_coords(self) -> None:
        """
        Check error is raised when passing non-positive coordinates with logscale
        """
        # Check if error is raised after a zero value in the array
        x = np.linspace(0, 5, 6)
        with pytest.raises(ValueError):
            _infer_interval_breaks(x, scale="log")
        # Check if error is raised after negative values in the array
        x = np.linspace(-5, 5, 11)
        with pytest.raises(ValueError):
            _infer_interval_breaks(x, scale="log")

        Check error is raised when passing non-positive coordinates with logscale
        
xarray/tests/test_plot.py