clipy
Clip data at given y-values for plotting
Call signature:
clipy(xx, yy, ymin=None, ymax=None)
Help text:
xx, yy = clipy(xx, yy, ymin, ymax) finds runs in the data where ymin <= yy <= ymax and returns those runs, placing np.nan in between runs. At the beginning and end of each run, a point (X, ymin) or (X, ymax) is inserted that marks the linearly interpolated location where the run passes through the threshold.
This is useful for plotting, because qplot does not implement xlim and ylim with a proper clip rectangle.
Download pdf