This document is archived and information here might be outdated.  Recommended version.


IClassify.SetHistogramData Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (System)  

IClassify.SetHistogramData Method

Adds data in form of a histogram (array of values (doubles) and a paired array of frequencies (longs)) to the classification.

[Visual Basic .NET]
Public Sub SetHistogramData ( _
    ByVal doubleArrayValues As Object, _
    ByVal longArrayFrequencies As Object _
)
[C#]
public void SetHistogramData (
    object doubleArrayValues,
    object longArrayFrequencies
);
[C++]
HRESULT SetHistogramData(
  VARIANT doubleArrayValues,
  VARIANT longArrayFrequencies
);
[C++]

Parameters doubleArrayValues [in] doubleArrayValues is a parameter of type VARIANT longArrayFrequencies [in] longArrayFrequencies is a parameter of type VARIANT

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

To pass numeric data into the Classify object, the SetHistogramData method is used. This takes two safe arrays that must have the same number of elements and an index of zero for their first element. The first array is the numeric data values, defined as an array of double. This array must be sorted in increasing value order. The second array represents the frequency of occurrence of the values, that is, an integer count of the number of times a value occurs.

For example, if the two arrays were called DataValues and DataFrequency, the lowest value would be stored in DataValue(0), and the number of times this value occurred would be stored in DataFrequency(0).

You could populate these arrays in code yourself, but if the data is available through the attribute field of a table, you can utilize the TableHistogram object to gather the data values and frequencies for you.

See Also

IClassify Interface