CHistogram:new


The new method constructs a new instance of a CHistogram object. You must call new before using any class methods or properties. Note that the object can also be created using new_histogram.

Syntax

H = CHistogram:new()

bullet.gif    H is returned as a new CHistogram object with properties initialized to default values.

bullet.gif    on failure, nil is returned.

Example

The following script creates a CHistogram object and uses it to calculate a histogram of data.

H = CHistogram:new()

-- create a Histogram object

y = H:Calc( gaussdev(1000000) )

-- compute a histogram

x = series(100)

-- create x axis values

stepline( x, y )

-- plot the histogram

H:delete()

-- clean up memory when done

Related Topics

CHistogram, delete, new_histogram


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