|
CHistogram:GetBinCount
The GetBinCount method returns the actual
bin count used by the histogram
Calc method. This method is useful after setting the
binning strategy with the
SetBinWidth or
SetBinAuto method since, in both cases, the bin
count is calculated from other parameters.
Syntax
nCount = CHistogram:GetBinCount()
nCount is the number
of bins used in the histogram.
Example
The following script retrieves the bin count for
use in setting up an x axis for plotting the histogram.
|
H = new_histogram
|
|
|
v = gaussdev( 1000000 )
|
|
|
y = H:Calc( v )
|
|
|
nCount =
H:GetBinCount()
|
|
|
nMin =
H:GetMin()+H:GetBinWidth()/2
|
|
|
nStep = H:GetBinWidth()
|
|
|
x = series( nCount, nMin, nStep
)
|
|
|
stepline( x, y )
|
|
|
H:delete()
|
|
Related Topics
CHistogram Class
SetBinCount
series
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.
|