def test_coord_with_interval_step_x(self) -> None:
        """Test step plot with intervals explicitly on x axis."""
        bins = [-1, 0, 1, 2]
        self.darray.groupby_bins("dim_0", bins).mean(...).plot.step(x="dim_0_bins")
        line = plt.gca().lines[0]
        assert isinstance(line, mpl.lines.Line2D)
        assert len(np.asarray(line.get_xdata())) == ((len(bins) - 1) * 2)
Test step plot with intervals explicitly on x axis.
xarray/tests/test_plot.py