Plotting X-X and Y-Y (a cross on a point)

조회 수: 13 (최근 30일)
Abhilash
Abhilash 2012년 4월 5일
Hey guys,
So I have these 6 values of a certain quantity. When I do a scatter plot, I get three points.
Now each of these 6 values have 2 confidence interval bounds for them. I want to plot the bounds as a cross passing through the point. Like error bars in X and Y.
So let's say there's a value x1 and one y1, each for the same condition. I scatter them as
plot(x1,y1,'ob')
so I get one point with coordinates (x1,y1).
for x1, I have confidence bounds [c1,c2] and for y1 I have [c3,c4]. c1 and c2 should be plotted both on X and a line should connect them and c3,c4 should both be on Y and a line should connect them. If my bootstrapping is robust, then (x1,y1) will be the center of this cross of (c1-c2,c3-c4).
Is there anyway to do it?
Thanks.
  댓글 수: 1
Oleg Komarov
Oleg Komarov 2012년 4월 5일
Have you checked the FEX, there are several submissions.

댓글을 달려면 로그인하십시오.

채택된 답변

Wayne King
Wayne King 2012년 4월 6일
x1 = 3;
y1 = 5;
c1 = 2; c2 = 4;
c3 = 4; c4 = 6;
plot(x1,y1,'ob')
hold on
axis([0 7 0 7])
hold on
plot([c1 c2],[y1 y1],'k')
plot([x1 x1],[c3 c4],'k')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by