Difference between revisions of "Plot error bars"
m (→See Also: OnGraphDraw) |
m |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | [[category:OnGraphDraw annotations library functions]] | |
+ | |||
Use this function in the [[OnGraphDraw]] attribute to plot error bars around data points. Error bars are vertical lines that extend above and below a data point to visually indicate a range of uncertainty. The annotation is usually applied to a line-symbol chart where only one line is present, or less commonly to a vanilla bar chart. | Use this function in the [[OnGraphDraw]] attribute to plot error bars around data points. Error bars are vertical lines that extend above and below a data point to visually indicate a range of uncertainty. The annotation is usually applied to a line-symbol chart where only one line is present, or less commonly to a vanilla bar chart. | ||
Line 18: | Line 19: | ||
The annotation works with a linear or log-scaled continuous Y-axis showing the variable's mean value. It also works with Swap XY (in which case the error bars are horizontal). | The annotation works with a linear or log-scaled continuous Y-axis showing the variable's mean value. It also works with Swap XY (in which case the error bars are horizontal). | ||
+ | |||
+ | == Library == | ||
+ | |||
+ | To use this function ,you must add the '''''OnGraphDraw annotations.ana''''' library to your model. | ||
+ | |||
+ | :Use '''File → Add Library...''' to add this library. | ||
== See Also == | == See Also == | ||
Line 24: | Line 31: | ||
* [[Plot_solid_prob_bands]] | * [[Plot_solid_prob_bands]] | ||
* [[Plot_Tukey_bars]] | * [[Plot_Tukey_bars]] | ||
+ | |||
+ | == History == | ||
+ | |||
+ | |||
+ | 'New to [[Analytica 5.2]]'' |
Latest revision as of 22:37, 4 December 2019
Use this function in the OnGraphDraw attribute to plot error bars around data points. Error bars are vertical lines that extend above and below a data point to visually indicate a range of uncertainty. The annotation is usually applied to a line-symbol chart where only one line is present, or less commonly to a vanilla bar chart.

Plot_error_bars( canv, info, roles, spread )
To use, in the OnGraphDraw attribute:
- From the Attributes dialog, turn on "Evaluate before drawing" AND "Evaluate after fully drawn".
- Calculate a spread for your variable. A common choice is:
SDeviation(Self)
. - Set the OnGraphDraw expression
- If info[ OnGraphDrawItem='ViewMode']='Mean' Then
- roleChanges := Plot_error_bars(canv, info, roles, phase, spread:SDeviation(Self));
- Note: You can substitute your own spread expression.
- Note: Error bars with
spread:SDeviation(Self)
are usually appropriate only from the Mean result view.
The annotation works with a linear or log-scaled continuous Y-axis showing the variable's mean value. It also works with Swap XY (in which case the error bars are horizontal).
Library
To use this function ,you must add the OnGraphDraw annotations.ana library to your model.
- Use File → Add Library... to add this library.
See Also
History
'New to Analytica 5.2
Comments
Enable comment auto-refresher