HIST_2D

The HIST_2D function returns the two dimensional density function (histogram) of two variables, a longword array of dimensions (MAX( V1 )+1, MAX( V2 )+1). Result( i,j ) is equal to the number of simultaneous occurrences of V1 = i and V2 = j at the specified element.

This routine is written in the IDL language. Its source code can be found in the file hist_2d.pro in the lib subdirectory of the IDL distribution.

Calling Sequence

Result = HIST_2D( V1, V2 )

Arguments

V1, V2

Arrays containing the variables. V1 and V2 must be of byte, integer, or longword type, and must contain no negative elements.

Keywords

BIN1

The size of each bin in the V1 direction (column width). If this keyword is not specified, the size is set to 1.

BIN2

The size of each bin in the V2 direction (row height). If this keyword is not specified, the size is set to 1.

MAX1

MAX1 is the maximum V1 value to consider. If this keyword is not specified, then V1 is searched for its largest value.

MAX2

MAX2 is the maximum V2 value to consider. If this keyword is not specified, then V2 is searched for its largest value.

MIN1

MIN1 is the minimum V1 value to consider. If this keyword is not specified, then it is set to 0.

MIN2

MIN2 is the minimum V2 value to consider. If this keyword is not specified, then it is set to 0.

Example

R = HIST_2D(image1, image2)

R = HIST_2D(LONG((F1+1) * 50), LONG((F2+1) * 50))

See Also

H_EQ_CT , H_EQ_INT , HIST_EQUAL , HISTOGRAM