CHistogram:GetMax CHistogram:new

CHistogram:GetMin


The GetMin method returns the actual minimum value used by the histogram Calc method. This method is useful when the minimum value is not known either because the default binning was used or the SetBinAuto method was used.

Syntax

nMinVal = CHistogram:GetMin( )

bullet.gif    nMinVal is the minimum value used in computing the histogram.

Example

The following script retrieves the minimum value for use in setting up an x axis for plotting the histogram.

H = new_histogram

-- create a Histogram object

v = gaussdev( 1000000 )

-- create this number of random deviates

y = H:Calc( v )

 

nCount = H:GetBinCount()

-- separate the 3 parameters for clarity

nMin = H:GetMin()+H:GetBinWidth()/2

 

nStep = H:GetBinWidth()

 

x = series( nCount, nMin, nStep )

-- create a series for the histgram x axis

stepline( x, y )

-- plot the histogram using default settings

H:delete()

 

Related Topics

CHistogram Class, SetBinAuto, GetMax, series


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.