add wait_until_over option
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user