CHistogram Class Description


The CHistogram class is used to compute the frequency distribution, or "histogram", of a 1-dimensional array. This class provides methods for choosing the binning strategy and for computing the histogram.

Usage

Construction

Object = new_histogram()

Object = CHistogram:new()

Destruction

Object:delete()

Global Histogram Function

hist

Returns the histogram of a 1-dimensional array without using the CHistogram class. This function uses default values for the binning properties.

histplot

Plots the histogram of a 1-dimensional array using default binning parameters as a stepline graph in a CPlotView window.

Creation - Non-class Functions

This function is normally used to create a new CHistogram object as an alternative to the class-based new method.

new_histogram

Global function that creates a new CHistogram object.

Construction and Destruction - Class Methods

new

Creates a new instance of a CHistogram object.

delete

Deletes the instance of the CHistogram object.

Operations

Calc

Calculates the histogram using current binning parameters.

SetBinWidth

Configures the histogram to prioritize the bin width.

SetBinCount

Configures the histogram to prioritize the number of bins.

SetBinAuto

Sets the binning to automatically compute binning parameters. This is the default.

SetCorrelated

Allows faster computation when the data are correlated rather than randomly ordered.

Auto Binning Methods

These methods return the actual binning values that were used for auto binning mode.

GetBinCount

Returns the bin count that was used.

GetBinWidth

Returns the bin width that was used.

GetMin

Returns the minimum value used

GetMax

Returns the maximum value used.

Related Topics

Script Classes, histplot


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