HistogramOptions
HistogramOptions ( doCountData ; doMoveHigher ; doIncludeEnds ; frequencyLineOption ; sortSeriesIndex )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
doCountData | int | 0..1 | off | |
doMoveHigher | int | 0..1 | on | |
doIncludeEnds | int | 0..1 | on | |
frequencyLineOption | int | 0..3 | none | |
sortSeriesIndex | int | -10000..10000 | 0 | +/-...asc/dec sort order |
Examples
HistogramOptions(;;;ogive)
HistogramOptions(on;;;;-1) /* Sort frequencies of 1st series in descending order. */
Description
As an option, values can also be evaluated without using interval ranges, but solely according to their frequencies. This is made possible by activating the 1st argument doCountData = on. The HistogramRange() function is ignored in this case, just as the arguments doMoveHigher and doIncludeEnds. The HistogramOptions() function should be entered after the Histogram() function.
| HISTOGRAM_OPTIONS_01 |
1 | OpenDrawing(250;150) |
2 | ChartData(1 10 7 10 1 5 3 7 3 1 1 6 10 1) |
3 | |
4 | HistogramOptions(on) /* 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 top to bottom. */ |
11 | |
12 | AxisMajorTicks(all;0) |
13 | /* Set up grid. */ |
14 | MajorGridLineWidths(x;y;0) |
15 | MajorGridLineWidths(y;x;0.25) |
16 |
| HISTOGRAM_OPTIONS_02 |
1 | OpenDrawing(250;150) |
2 | ChartData(6 2 5 7 3 6 5 3 7 3 2 5 1 6 10 5) |
3 | Histogram(;80) |
4 | HistogramOptions(on) /* After Histogram() */ |
5 | /* Set up styles. */ |
6 | FillStyle(1;#4682b420) |
7 | BorderStyle(1;;1;#4682b4) |
8 | /* Set up axes. */ |
9 | ScalingOptions(y;;on) /* Integers only. */ |
10 | |
11 | |
12 | AxisMajorTicks(x;0) |
13 | AxisMajorTicks(y;5;0.25;;;out) |
14 | /* Set up grid. */ |
15 | |
16 |
By using the 2nd argument doMoveHigher, the assignment of the values, which are located exactly on an interval limit, can be controlled. As the default, these "limit values" are assigned to the higher bin (doMoveHigher = on), when doMoveHigher = off they are assigned to the lower bin.
| HISTOGRAM_OPTIONS_03 |
1 | OpenDrawing(250;150) |
2 | ChartData(1 0 9 5 7 4 2 6 5) |
3 | |
4 | HistogramRange(0;8;4) /* After Histogram() */ |
5 | HistogramOptions(;on) /* After Histogram() */ |
6 | /* Set up styles. */ |
7 | FillStyle(1;#4682b420) |
8 | BorderStyle(1;;1;#4682b4) |
9 | /* Set up axes. */ |
10 | ScalingOptions(y;;on) /* Integers only. */ |
11 | |
12 | AxisMajorTicks(all;0) |
13 | /* Set up grid. */ |
14 | MajorGridLineWidths(x;y;0.25) |
15 | MajorGridLineWidths(y;x;0) |
16 |
| HISTOGRAM_OPTIONS_04 |
1 | OpenDrawing(250;150) |
2 | ChartData(1 0 9 5 7 4 2 6 5) |
3 | |
4 | HistogramRange(0;8;4) /* After Histogram() */ |
5 | HistogramOptions(;off) /* After Histogram() */ |
6 | /* Set up styles. */ |
7 | FillStyle(1;#4682b420) |
8 | BorderStyle(1;;1;#4682b4) |
9 | /* Set up axes. */ |
10 | ScalingOptions(y;;on) /* Integers only. */ |
11 | |
12 | AxisMajorTicks(all;0) |
13 | /* Set up grid. */ |
14 | MajorGridLineWidths(x;y;0.25) |
15 | MajorGridLineWidths(y;x;0) |
16 |
The additional two end bins can be suppressed by using the 3rd argument doIncludeEnds = off.
| HISTOGRAM_OPTIONS_05 |
1 | OpenDrawing(250;150) |
2 | ChartData(1 0 9 5 7 4 8 6 5) |
3 | |
4 | HistogramRange(0;8;4) /* After Histogram() */ |
5 | HistogramOptions(;;off) /* After Histogram() */ |
6 | /* Set up styles. */ |
7 | |
8 | BorderStyle(1;none) |
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_OPTIONS_06 |
1 | OpenDrawing(250;150) |
2 | ChartData(1 0 9.9 5 7.2) |
3 | |
4 | HistogramOptions(;;off) /* After Histogram() */ |
5 | HistogramRange(0;10;5) /* After Histogram() */ |
6 | /* Set up styles. */ |
7 | FillStyle(1;#4682b420) |
8 | BorderStyle(1;;1;#4682b4) |
9 | /* Set up axes. */ |
10 | ScalingOptions(x;;on) /* Integers only. */ |
11 | ScalingOptions(y;on) /* y-scale top to bottom. */ |
12 | |
13 | AxisMajorTicks(all;0) |
14 | /* Set up grid. */ |
15 | MajorGridLineWidths(x;y;0) |
16 | MajorGridLineWidths(y;x;0.25) |
17 |
As an option, frequency lines can be added to histograms. As the 4th argument frequencyLineOption, four constants are available for this. The appearance of the frequency lines can be controlled by the LineStyle() function.
| HISTOGRAM_OPTIONS_07 |
1 | OpenDrawing(250;150) |
2 | ChartData(1 4 9.9 5 4.2 3 4.9 6 |
3 | 6 9 8 7 2 12 3 3.5 11) |
4 | |
5 | HistogramRange(0;8;8) /* After Histogram() */ |
6 | HistogramOptions(;off;off;frequency) |
7 | /* Set up styles. */ |
8 | FillStyle(1;#4682b420) |
9 | BorderStyle(1;;1;#4682b4) |
10 | |
11 | SymbolStyle(1;circle;5;1;darkRed;;white) |
12 | /* Set up axes. */ |
13 | ScalingOptions(y;;on) /* Integers only. */ |
14 | |
15 | |
16 | AxisMajorTicks(x;0) |
17 | AxisMajorTicks(y;5;0.25;;;out) |
18 | AxisMajorTickLabelTexts(x;"(|u|]") |
19 | /* Set up grid. */ |
20 | |
21 |
| HISTOGRAM_OPTIONS_08 |
1 | OpenDrawing(250;150) |
2 | ChartData(6 2 5 7 3 6 5 3 7 3 2 5 1 6 10 5) |
3 | |
4 | HistogramOptions(on;;;ogive) /* After Histogram() */ |
5 | /* Set up styles. */ |
6 | FillStyle(1;#4682b420) |
7 | BorderStyle(1;;1;#4682b4) |
8 | |
9 | /* Set up axes. */ |
10 | ScalingOptions(y;;on) /* Integers only. */ |
11 | |
12 | AxisMajorTicks(all;0) |
13 | /* Set up grid. */ |
14 | MajorGridLineWidths(x;y;0.25) |
15 | MajorGridLineWidths(y;x;0) |
16 |
By using the 5th argument sortSeriesIndex the frequencies of the values of a series can be sorted ascendingly (sortSeriesIndex = seriesIndex) or descendingly (sortSeriesIndex = –seriesIndex).
| HISTOGRAM_OPTIONS_09 |
1 | OpenDrawing(250;150) |
2 | ChartData(1 10 7 10 1 5 3 7 3 1 1 6 10 1) |
3 | |
4 | HistogramOptions(on;;;;-1) /* 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 top to bottom. */ |
11 | |
12 | AxisMajorTicks(all;0) |
13 | /* Set up grid. */ |
14 | MajorGridLineWidths(x;y;0) |
15 | MajorGridLineWidths(y;x;0.25) |
16 |