ErrorBarFunction
is an option for ErrorListPlot that specifies a function to apply to determine the shape of error bars.
ErrorBarFunction
ErrorBarFunction
is an option for ErrorListPlot that specifies a function to apply to determine the shape of error bars.
Details and Options
- To use ErrorBarFunction, you first need to load the ErrorBar Plotting Package using Needs["ErrorBarPlots`"].
- ErrorBarFunction->Automatic generates default error bars.
- ErrorBarFunction->f specifies that the function f of two arguments is used to generate the error bar.
- With setting f, the first argument supplied to f is the point around which the error bars are drawn.
- With setting f, the second argument supplied to f is an ErrorBar object indicating the x and y errors.
Examples
Basic Examples (1)
Needs["ErrorBarPlots`"]Error bars display as intersecting lines by default:
ErrorListPlot[{{{1, 1}, ErrorBar[0.2, 0.3]}, {{2, 2}, ErrorBar[0.2, 0.3]}, {{3, 4}, ErrorBar[0.2, 0.5]}, {{4, 8}, ErrorBar[1, 2]}},
ErrorBarFunction -> Automatic]ErrorBarFunction can be used to show error regions as rectangles:
ErrorListPlot[{{{1, 1}, ErrorBar[0.2, 0.3]}, {{2, 2}, ErrorBar[0.2, 0.3]}, {{3, 4}, ErrorBar[0.2, 0.5]}, {{4, 8}, ErrorBar[1, 2]}},
ErrorBarFunction -> Function[{coords, errs}, {Opacity[0.2], Rectangle[coords + {errs[[1, 1]], errs[[2, 1]]}, coords + {errs[[1, 2]], errs[[2, 2]]}]}]]See Also
Related Guides
Text
Wolfram Research (2007), ErrorBarFunction, Wolfram Language function, https://reference.wolfram.com/language/ErrorBarPlots/ref/ErrorBarFunction.html.
CMS
Wolfram Language. 2007. "ErrorBarFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ErrorBarPlots/ref/ErrorBarFunction.html.
APA
Wolfram Language. (2007). ErrorBarFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ErrorBarPlots/ref/ErrorBarFunction.html
BibTeX
@misc{reference.wolfram_2026_errorbarfunction, author="Wolfram Research", title="{ErrorBarFunction}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ErrorBarPlots/ref/ErrorBarFunction.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_errorbarfunction, organization={Wolfram Research}, title={ErrorBarFunction}, year={2007}, url={https://reference.wolfram.com/language/ErrorBarPlots/ref/ErrorBarFunction.html}, note=[Accessed: 13-June-2026]}