Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: errorbars, whiskers length, simple question
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
leo nidas

Posts: 219
Registered: 11/24/07
errorbars, whiskers length, simple question
Posted: Feb 6, 2013 7:10 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Hi there,

I want to plot some error bars. The code is at the end of this message and runs just fine. I am plotting five errorbars regarding some estimated quantities "ests" and their corresponding confidence intervals that appear in "cis".

The only thing that I do not like is the length of the horizontal whiskers. Why does it differ form errorbar to errorbar? It actually increases if you observe carefully. I would like all errorbars have the same length regarding their horizontal whiskers.

Thanx in advance for any answers!

close all

cis=[0.5563 0.6911;0.5511 0.6946;0.5578 0.7028;0.5667 0.7067;0.5685 0.7132];
ests=[0.5919;0.5942;0.5962;0.5994;0.6049];
hold on
plot(2.5, ests(1),'*k')
plot(5, ests(2),'*k')
plot(7.5, ests(3),'*k')
plot(10, ests(4),'*k')
plot(12.5,ests(5),'*k')


axis([0 14 0 1])
errorbar(2.5 ,ests(1) ,(ests(1)-cis(1,1)),(cis(1,2)-ests(1)),'k')
errorbar( 5 ,ests(2) ,(ests(2)-cis(2,1)),(cis(2,2)-ests(2)),'k')
errorbar(7.5 ,ests(3) ,(ests(3)-cis(3,1)),(cis(3,2)-ests(3)),'k')
errorbar(10 ,ests(4) ,(ests(4)-cis(4,1)),(cis(4,2)-ests(4)),'k')
errorbar(12.5,ests(5) ,(ests(5)-cis(5,1)),(cis(5,2)-ests(5)),'k')



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.