pingwyn.curve_fix_zero

pingwyn.curve_fix_zero(curve, strat='x')

Shift a curve such that the points at x = 0 or y = 0 are set to zero.

Parameters:
  • curve (pingwyn.Curve) – The curve to shift.

  • strat ({"x", "origin", "y", "zero"}) – The shifting strategy to apply. “x” and “origin” will shift the y-axis, such that the datapoint at x = 0 is set to y = 0. “y” and “zero” will find the point closest to y = 0, and shift that point to y = 0. For both strategy types, the entire curve is shifted.

Returns:

The shifted curve.

Return type:

pingwyn.Curve