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.
更多信息和选项
- 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.
范例
基本范例 (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]]}]}]]相关指南
文本
Wolfram Research (2007),ErrorBarFunction,Wolfram 语言函数,https://reference.wolfram.com/language/ErrorBarPlots/ref/ErrorBarFunction.html.
CMS
Wolfram 语言. 2007. "ErrorBarFunction." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ErrorBarPlots/ref/ErrorBarFunction.html.
APA
Wolfram 语言. (2007). ErrorBarFunction. Wolfram 语言与系统参考资料中心. 追溯自 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: 05-September-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: 05-September-2026]}