Histogram
Contents
Description
This function generates data bins from vector vd in the specified range from min to max. The bin width is equal to inc. The function will include values that fall on the lower edge of the bin, however the function will put data that falls on the upper edge into the next higher bin.
Syntax
dataset histogram(dataset vd, double inc, double min, double max)
Parameter
vd
- a vector, can be a dataset, a range or a column in Origin worksheet.
inc
- bin width.
min
- the lower edge of the range in vd.
max
- the upper edge of the range in vd.
Return
Returns a vector containing the number of elements within every bin.
Example
newbook; wks.ncols=3; col(A)=normal(100); col(B)={-1.375:0.25:1.375}; col(C)=histogram(col(a), 0.25, -1.5, 1.5); col(B)[L]$ = Bin Center; col(C)[L]$ = Count; plotxy (2,3) plot:=203; set %c -pfb 2; set %c -pfp 3;