fastplotlib.RangeContinuous#

class RangeContinuous(start, stop, step)[source]#

A continuous reference range for a single slider dimension.

Stores the (start, stop, step) in scientific units (ex: seconds, micrometers, Hz). The imgui slider for this dimension uses these values to determine its minimum and maximum bounds. The step size is used for the “next” and “previous” buttons.

Parameters:
  • start (int or float) – Minimum value of the range, inclusive.

  • stop (int or float) – Maximum value of the range, exclusive upper bound.

  • step (int or float) – Step size used for imgui step next/previous buttons

Raises:

IndexError – If start >= stop.

Examples

A time axis sampled at 1 ms resolution over 10 seconds:

RangeContinuous(start=0, stop=10_000, step=1)

A depth axis in micrometers with 0.5 µm steps:

RangeContinuous(start=0.0, stop=500.0, step=0.5)