diff --git a/plotter.py b/plotter.py index bed1780..e3a1dc3 100644 --- a/plotter.py +++ b/plotter.py @@ -1340,6 +1340,7 @@ class Plotter(Aggregator, BaseProcessor): sigma_err=2.0, subname_x=None, subname_y=None, + wait_until_over=None, **kwargs, ): """ @@ -1434,6 +1435,11 @@ class Plotter(Aggregator, BaseProcessor): self.logger.warning( "Errorbar may be meaningless when ytransform is used" ) + + # Offset to start x when y in over a given value + if wait_until_over is not None: + offset = np.argmax(y > wait_until_over) + x = x - x[offset] self.plot(x, y, yerr=yerr, xlabel=xlabel, ylabel=ylabel, run=run, **kwargs)