Be the first to rate this file! 22 downloads (last 30 days) File Size: 2.17 KB File ID: #23465

Enhanced Errorbar Function

by Yu Heng

 

28 Mar 2009

No BSD License  

can draw errorbar along X/Y/Dual axis in normal,semilog,loglog coordinate system

Download Now | Watch this File

File Information
Description

% 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 length of top line automatically,
% can also control dotstyle and 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

% 误差棒函数增强版
% ERRORBARE(STY,X,Y,Xbar,Ybar,symbol)
% 可在各个坐标系中沿X轴,Y轴方向,或者两轴方向绘制误差棒,
% 能够根据所选坐标类型调整端点线长。
% 增加对误差棒的线型控制,用法与原errorbar函数中相同
%
% 若上下限范围不同,X为列向量时应按照
% [下限,上限] 的格式输入,若为行向量则为 [下限;上限]
%
% STY 参数包括 v,h,d,vlogx,hlogx,dlogx,vlogy,hlogy,
% dlogy,vlogd,hlogd,dlogd 共12种
% v 表示误差棒垂直,
% h 表示误差棒水平,
% d (dual) 显示双轴误差,
% logx 对应 semilogx,前缀 v,h,d 意义同上
% logy 对应 semilogy,前缀 v,h,d 意义同上
% logd 对应 loglog,前缀 v,h,d 意义同上

% For example,
% x = 1:10;
% y = sin(x)+2;
% e = std(y)*ones(size(x));
% errorbare(x,y,e) % use function "errorbar" directly
% errorbare(x,y,e,'or')
% errorbare('v',x,y,e) % "e" is error of "y"
% errorbare('v',x,y,[e;2*e]) % try different error limits
% errorbare('hlogx',x,y,e) % "e" is error of "x" here,
% errorbare('d',x,y,e,e)
% errorbare('d',x,y,e,e,'or')
% errorbare('dlogd',x,y,e,e)
%
% by Heng Yu Email: henrysting@hotmail.com
% $Revision: 1.1 $ $Date: 2009/03/28 $

MATLAB release MATLAB 6.5 (R13)
Zip File Content  
Other Files errorbare.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
errorbar Yu Heng 30 Mar 2009 14:17:03
plot Yu Heng 30 Mar 2009 14:17:03
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com