HOME > テクニカルサポート > 製品 一覧 > SigmaPlot > ユーザーガイド > トランスフォーム関数一覧
ヒューリンクステクニカルサポート
皆様からのご質問のうち、よくある質問を掲載しました。
更新日: 14/05/08

histogram

関数 histogram は、指定範囲の値を、指定間隔の階級に分けたヒストグラムを作成します。

 

構文

histogram(range, buckets)

引数 range には、1つの範囲 ({} で指定) 、もしくは、ワークシートの1列を指定します。範囲内に含まれる欠損値または文字列は、無視されます。

引数 buckets には、等間隔で増加するヒストグラムの階級数、または、階級数とその範囲の両方を指定します。この値には、スカラーまたは範囲を指定します。いずれの場合も、欠損値や文字列は無視されます。

パラメータ buckets がスカラーの場合は、正の整数で指定する必要があります。スカラーで指定されている場合は、この値で指定した階級数が設定されます。ヒストグラムの階級は等間隔で、その範囲は指定したデータ範囲の最小値から最大値までとなります。

引数 buckets を範囲で指定した場合は、範囲内の各値が階級の上限値 (その値を含む) になります。-∞ から最初の階級値までが 1番目のデータ区間、1番目の上限値を越え 2番目の階級値までが2番目のデータ区間、というようになります。従って、buckets 範囲は昇順に入力します。定義した範囲に含まれない値を数えるには、階級を別に定義します。この範囲外の値の個数 (0やない場合も含めて) はヒストグラム関数によって生成される最後の配列の要素となります。

 

例 1

 

例 2

 

histogram

The histogram function produces a histogram of the values range in a specified range, using a defined interval set.

Syntax

histogram(range,buckets)

The range argument must be a single range (indicated with the {} brackets) or a worksheet column. Any missing value or text string contained within a range is ignored.

The buckets argument is used to specify either the number of evenly incremented histogram intervals, or both the number and ranges of the intervals. This value can be scalar or a range. In both versions, missing values and strings are ignored.

If the buckets parameter is a scalar, it must be a positive integer. A scalar buckets argument generates a number of intervals equal to the buckets value. The histogram intervals are evenly sized; the range is the minimum value to the maximum value of the specified range.

If the buckets argument is specified as a range, each number in the range becomes the upper bound (inclusive) of an interval. Values from -∞ to ≤ the first bucket fall in the first histogram interval, values from > first bucket to ≤ second bucket fall in the second interval, etc. The buckets range must be strictly increasing in value. An additional interval is defined to catch any value which does not fall into the defined ranges. The number of values occurring in this extra interval (including 0, or no values outside the range) becomes the last entry of the range produced by histogram function.

Example 1

For col(1) = {1,20,30,35,40,50,60}, the operation col(2) = histogram(col(1),3) places the range {2,3,2} in column 2. The bucket intervals are automatically set to 20, 40, and 60, so that two of the values in column 1 fall under 20, three fall under 40, and two fall under 60.

Example 2

For buckets = {25,50,75}, the operation col(3) = histogram(col(1),buckets)places {2,4,1,0} in col(3). Two of the values in column 1 fall under 25, four fall under 50, one under 75, and no values fall outside the range.

 

 

 

前のページにもどる