Histogram
Histogram ( appearanceConst ; categoryGap ; seriesGap )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
appearanceConst | int | 0..127 | default | |
categoryGap | num | 0..10000 | 0 | In % of bar width |
seriesGap | num | -200..10000 | 0 | In % of bar width |
Examples
Histogram(;100)
Description
The Histogram() function serves to evaluate and depict frequency distributions. As the default, the value range is determined by the largest and smallest value in the ChartData() function and divided into 10 bins (intervals). Please note that, as the default, two end intervals are added, i.e. when, for example, numOfBins = 3, a total of five bins are depicted. Bins are labeled by the interval limits entered in brackets. For example, [2,4) means the bin includes all values greater or equal than two and less than four.
| HISTOGRAM_01 |
1 | OpenDrawing(250;150) |
2 | ChartData(6.5 0 2.9 1.5 3 2.5 5.9) |
3 | |
4 | HistogramRange(0;6;3) /* After Histogram() */ |
5 | /* Set up styles. */ |
6 | FillStyle(1;#4682b420) |
7 | BorderStyle(1;;1;#4682b4) |
8 | /* Set up axes. */ |
9 | |
10 | AxisMajorTicks(all;0) |
11 | /* Set up grid. */ |
12 | MajorGridLineWidths(x;y;0.25) |
13 | MajorGridLineWidths(y;x;0) |
14 |
| HISTOGRAM_02 |
1 | OpenDrawing(250;150) |
2 | ChartData(1 2 0 3 8 4 5 -2 6 9 5 2 12 2) |
3 | |
4 | HistogramRange(0;10;5) /* After Histogram() */ |
5 | /* Set up styles. */ |
6 | FillStyle(1;#4682b420) |
7 | BorderStyle(1;;1;#4682b4) |
8 | /* Set up axes. */ |
9 | ScalingOptions(x;;on) /* Integers only. */ |
10 | ScalingOptions(y;on) /* y-scale bottom to top. */ |
11 | |
12 | AxisMajorTicks(all;0) |
13 | /* Set up grid. */ |
14 | MajorGridLineWidths(x;y;0) |
15 | MajorGridLineWidths(y;x;0.25) |
16 |
The appearance of the bars is controlled by the arguments appearanceConstants, categoryGap and seriesGap in the Histogram() function. These arguments are discussed in detail in combination with the BarChart() function.
| HISTOGRAM_03 |
1 | OpenDrawing(250;150) |
2 | ChartData(2.1 4.8 0 7 9.9 5 7.2 6 4 8 2.5 5.1) |
3 | |
4 | HistogramRange(0;10;5) /* After Histogram() */ |
5 | /* Set up styles. */ |
6 | |
7 | BorderStyle(1;none) |
8 | ShadowStyle(all;2 2 3) |
9 | /* Set up axes. */ |
10 | ScalingOptions(x;;on) /* Integers only. */ |
11 | ScalingOptions(y;on) /* y-scale bottom to top. */ |
12 | |
13 | AxisMajorTicks(all;0) |
14 | /* Set up grid. */ |
15 | MajorGridLineWidths(x;y;0) |
16 | MajorGridLineWidths(y;x;0.25) |
17 |
| HISTOGRAM_04 |
1 | OpenDrawing(250;150) |
2 | ChartData(1 0 9.9 5 7.2 3 0.9 6 -.5; /* 1st series. */ |
3 | 6 9 2 7 2 12 -2 0.5 11 -1) /* 2nd series. */ |
4 | |
5 | HistogramRange(0;10;2) /* After Histogram() */ |
6 | /* Set up styles. */ |
7 | |
8 | |
9 | ShadowStyle(all;2 2 3) |
10 | /* Set up axes. */ |
11 | ScalingOptions(y;;on) /* Integers only. */ |
12 | |
13 | AxisMajorTicks(all;0) |
14 | /* Set up grid. */ |
15 | MajorGridLineWidths(x;y;0.25) |
16 | MajorGridLineWidths(y;x;0) |
17 |
| HISTOGRAM_05 |
1 | OpenDrawing(250;150) |
2 | ChartData(1 0 9.9 5 7.2 3 0.9 6; /* 1st series. */ |
3 | 6 9 8 7 2 12 -2 0.5 11) /* 2nd series. */ |
4 | Histogram(horizontal+stacked+shadow;40) |
5 | HistogramRange(0;10;5) /* After Histogram() */ |
6 | /* Set up styles. */ |
7 | |
8 | |
9 | ShadowStyle(all;2 2 3) |
10 | /* Set up axes. */ |
11 | ScalingOptions(x;;on) /* Integers only. */ |
12 | ScalingOptions(y;on) /* y-scale bottom to top. */ |
13 | |
14 | AxisMajorTicks(all;0) |
15 | /* Set up grid. */ |
16 | MajorGridLineWidths(x;y;0) |
17 | MajorGridLineWidths(y;x;0.25) |
18 |