---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ytsaurus.tech/docs/en/yql/udf/list/histogram.md
  - https://ytsaurus.tech/docs/ru/yql/udf/list/histogram.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ytsaurus.tech/docs/en/llms.txt

# Histogram

Set of auxiliary functions for the [`HISTOGRAM` aggregate function](https://ytsaurus.tech/docs/en/yql/builtins/aggregation.md). In the signature description below, HistogramStruct refers to the result of the aggregate function `HISTOGRAM`, `LinearHistogram` or `LogarithmicHistogram` being a structure of a certain type.

## List of functions {#function-list}

* `Histogram::Print(HistogramStruct{Flags:AutoMap}, Byte?) -> String`
* `Histogram::Normalize(HistogramStruct{Flags:AutoMap}, [Double?]) -> HistogramStruct`. In the second argument, the desired histogram area is 100 by default.
* `Histogram::ToCumulativeDistributionFunction(HistogramStruct{Flags:AutoMap}) -> HistogramStruct`
* `Histogram::GetSumAboveBound(HistogramStruct{Flags:AutoMap}, Double) -> Double`
* `Histogram::GetSumBelowBound(HistogramStruct{Flags:AutoMap}, Double) -> Double`
* `Histogram::GetSumInRange(HistogramStruct{Flags:AutoMap}, Double, Double) -> Double`
* `Histogram::CalcUpperBound(HistogramStruct{Flags:AutoMap}, Double) -> Double`
* `Histogram::CalcLowerBound(HistogramStruct{Flags:AutoMap}, Double) -> Double`
* `Histogram::CalcUpperBoundSafe(HistogramStruct{Flags:AutoMap}, Double) -> Double`
* `Histogram::CalcLowerBoundSafe(HistogramStruct{Flags:AutoMap}, Double) -> Double`

`Histogram::Print` has an optional numeric argument that sets the maximum length of the histogram columns (the length is in characters, since the histogram is rendered in ASCII art). The default value is 25. First and foremost, this function serves to view histograms on the console. Web interface performs their interactive visualization automatically.



