logarithmicBins() function
logarithmicBins()
生成一个指数分隔的浮点值列表。
使用 linearBins()
为 histogram()
生成 bin 边界。
Function type signature
(count: int, factor: float, start: float, ?infinity: bool) => [float]
有关更多信息,请参见 函数类型签名。
参数
start
(必需) 列表中要返回的第一个值。
factor
(必需) 应用于后续值的乘数。
count
(必需) 要返回的值的数量。
infinity
在列表末尾包含一个无限值。默认为 true
。
示例
生成一个指数增长的值列表
logarithmicBins(
start: 1.0,
factor: 2.0,
count: 10,
infinity: true,
)// Returns [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, +Inf]
此页面是否有帮助?
感谢您的反馈!