|
|
errorbars, whiskers length, simple question
Posted:
Feb 6, 2013 7:10 PM
|
|
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')
|
|