Matlab中具有非对称误差范围的条形图 [英] bar with asymmetric error bounds in Matlab

查看:131
本文介绍了Matlab中具有非对称误差范围的条形图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想画一条带有错误边界的条形图,例如 http://www.mathworks .ch/matlabcentral/fileexchange/9377-barerror .有许多结合bar()和errorbar()来执行此操作的脚本.但是,我发现的所有内容只能处理对称错误.谁能告诉我如何添加不对称误差范围,例如errorbar(X,Y,L,U)但在条形图上,而不是曲线上?谢谢.

I want to draw a bar with error bounds like this http://www.mathworks.ch/matlabcentral/fileexchange/9377-barerror. There are many scripts to do this around that combine bar() and errorbar(). But all I found can only deal with symmetric errors. Can anyone show me how to add asymmetric error bounds like errorbar(X,Y,L,U) but on bar, not on curve? Thanks.

推荐答案

您可以在条形图上绘制误差线:

You can plot errorbars over your bar chart:

 data = 1:10;
 eH = rand(10,1);
 eL = rand(10,1);

 figure;
 hold all;
 bar(1:10, data)
 errorbar(1:10, data, eL, eH, '.')

这篇关于Matlab中具有非对称误差范围的条形图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆