应读者要求,为Matlab误差棒函数增强版加入了颜色和点型控制功能,顺便加了个英文说明,上传到Mathworks 社区,点此访问,这才发现已经有了那么多类似的函数,果然工作还是要趁早啊,看论文去了……
% ERRORBARE Enhanced Errorbar Function.
% ERRORBARE(STY,X,Y,Xbar,Ybar,symbol)
% It can draw errorbar along X/Y/Dual axis
% in normal,semilog,loglog coordinate system,
% and adjust width of bar handles automatically,
% can also control dotstyle/color in the same way with errorbar.
%
% If the lower and upper error range of x/y is different,
% they should be input as [lower,upper] if x/y is a column vector;
% for a row vector, they should be [lower;uper].
%
% parameter STY include 12 types:
% v,h,d,vlogx,hlogx,dlogx,vlogy,hlogy,
% dlogy,vlogd,hlogd,dlogd
% where
% v stands for vertical errorbar,
% h draws horizontal errorbar,
% d means dual direction,
% logx corresponding to semilogx,can use preffix v/h/d
% logy corresponding to semilogy,can use preffix v/h/d
% logd corresponding to loglog,can use preffix v/h/d
继续阅读 →