Difference between revisions of "Plot error bars"

(library and category)
m
 
Line 1: Line 1:
 
[[category:OnGraphDraw annotations library functions]]
 
[[category:OnGraphDraw annotations library functions]]
''New to [[Analytica 5.2]]''
+
 
  
 
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 31: 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.

Example of Error Bars.png

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 <code>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


You are not allowed to post comments.