Function Reference


_Array1DToHistogram

Transform a 1D array to Histogram

#include <Array.au3>
_Array1DToHistogram ( $aArray [, $iSizing = 100] )

Parameters

$aArray Array to transform
$iSizing [optional] Allows to zoom the histogram. Default = 100 percent

Return Value

Success: the array transformed.
Failure: sets the @error flag to non-zero.
@error: 1 - $aArray is not a 1D array

Remarks

Right alignment of negative values is not perfect due to non fixed font usage.

Example

Example 1

#include <Array.au3>

Local $aNEW[] = [0, -80, -49, -44, 80, 100, 8, 7, 6, 5, 4, 3, 2, 1]
Local $aArray = _Array1DToHistogram($aNEW, 125)
_ArrayDisplay($aArray, "_Array1DToHistogram")

Example 2

#include <Array.au3>

Local $iLimit = 500
Local $aValues[51]
Local $t, $n

For $i = 1 To $iLimit
        $t = TimerInit()
        Sleep(10)
        $n = Round(TimerDiff($t))
        $aValues[$n] += 1
Next
Local $aArray = _Array1DToHistogram($aValues)
_ArrayDisplay($aArray, "_Array1DToHistogram", "10:20")