ErrorBars
ErrorBars ( seriesIndex ; axisIndex ; errorDirection ; type ; addlData1 ; addlData2 ; addlData3 ; addlData4 )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
seriesIndex | int | 0..10000 | all | |
axisIndex | int | 0..3 | all | |
errorDirection | int | 0..3 | both | |
type | int | 0..5 | stdError | |
addlData1 | num | 0..inf | (see desc.) | Data for pos.x-error |
addlData2 | num | 0..inf | (see desc.) | Data for neg.x-error |
addlData3 | num | 0..inf | (see desc.) | Data for pos.y-error |
addlData4 | num | 0..inf | (see desc.) | Data for neg.y-error |
Description
By using the ErroBars() function, all important parameters for calculating error bars can be controlled. The 1st argument seriesIndex defines which data series the function refers to. By using the 2nd argument axisIndex, the direction of the error bars can be defined for two-dimensional charts. If no axis index is defined or if axisIndex = all is set, error bars are calculated in both the x and y-direction. By using the 3rd argument errorDirection, it is possible to define whether only positive errors (errorDirection = plus) or only negative errors (errorDirection = minus) or both errors (errorDirection = both) should be represented. As the default, both errors are represented (errorDirection = both). The method of error calculation is defined by using the argument type. Five calculation methods are available for this. If type is not defined, the standard error is calculated by default. User-defined error lists (type = valueList) are entered by using the ErrorBarData() function. The meaning of the arguments addlData1 to addlData4 depends on the type of error calculation:
- Standard error: addlData1...addlData4 have no meaning and are ignored.
- Standard deviation: addlData1...addlData4 are standard deviations, default: 1
- Percent error: addlData1...addlData4 are percent values, default: 5%
- Constant error: addlData1...addlData4 are constant values, default: 1
- User-defined error lists: addlData1...addlData4 have no meaning and are ignored.
Argument addlData1 refers to the positive error in the x-direction, argument addlData2 to the negative error in the x-direction; arguments addlData3 and addlData4 refer to the positive and negative errors in the y-direction.
| ERROR_BARS_01 |
1 | OpenDrawing(250;150) |
2 | ChartData(7 15 20 24 26 22) |
3 | ScatterChart(;on) |
4 | ErrorBars() /* Default: Standard error. */ |
5 | /* Set up styles. */ |
6 | SymbolStyle(all;none) |
7 | /* Set up axes. */ |
8 | |
9 | |
10 | AxisMajorTicks(all;0) |
11 | /* Set up grid. */ |
12 | MajorGridLineWidths(x;y;0.25) |
13 | MajorGridLineWidths(y;x;0) |
14 |
| ERROR_BARS_02 |
1 | OpenDrawing(200;200) |
2 | ChartData( 7 11 12 20 26 25; /* x-values. */ |
3 | 21 23 9 9 19 5) /* y-values. */ |
4 | |
5 | |
6 | /* Set up styles. */ |
7 | SymbolStyle(1;circle;4.5;1;black;;white) |
8 | /* Set up axes. */ |
9 | |
10 | |
11 | AxisMajorTicks(all;0) |
12 | /* Set up grid. */ |
13 | MajorGridLineWidths(all;all;0.25) |
14 | |
15 |
| ERROR_BARS_03 |
1 | OpenDrawing(250;150) |
2 | ChartData(7 15 20 24 26 22) |
3 | |
4 | |
5 | /* Set up styles. */ |
6 | |
7 | /* Set up axes. */ |
8 | |
9 | AxisMajorTicks(all;0) |
10 | /* Set up grid. */ |
11 | MajorGridLineWidths(x;y;0.25) |
12 | MajorGridLineWidths(y;x;0) |
13 |