Skip to content

clamp-min

Input Stack:
minValue: Double
expr: TimeSeriesExpr
Output Stack:
TimeSeriesExpr
 

Limit the minimum value of a time series by clamping values below a specified threshold. Any values less than the minimum will be set to the minimum value, while values at or above the minimum remain unchanged. This is the counterpart to :clamp-max for setting floor values.

Parameters

  • expr: The time series expression to apply the minimum limit to
  • minValue: The minimum allowed value (values below this will be clamped)

Behavior

  • Values ≥ minValue: Remain unchanged
  • Values < minValue: Are set to exactly minValue
  • Missing data: NaN values are preserved as NaN

Examples

Setting a minimum threshold to prevent negative spikes:

BeforeAfter
name,sps,:eq,
:sum
name,sps,:eq,
:sum,
200e3,:clamp-min
  • :clamp-max - Limit maximum values (ceiling operation)

See Also

  • Axis Bounds - Global axis scaling options
  • Axis Scale - Alternative approaches for handling extreme values