logarithmicBins() function

The logarithmicBins() function generates a list of exponentially separated floats. It is a helper function meant to generate bin bounds for the histogram() function.

Function type: Miscellaneous
Output data type: Array of floats

logarithmicBins(start:1.0, factor: 2.0, count: 10, infinity: true)



The first value in the returned bin list.

Data type: Float


The multiplier applied to each subsequent bin.

Data type: Float


The number of bins to create.

Data type: Integer


When true, adds an additional bin with a value of positive infinity. Defaults to true.

Data type: Boolean


logarithmicBins(start: 1.0, factor: 2.0, count: 10, infinity: true)

// Generated list: [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, +Inf]

Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: