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

9 ビュー (過去 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 Center および File ExchangeScatter Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by