Plotting X-X and Y-Y (a cross on a point)
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Réponse acceptée
Wayne King
le 6 Avr 2012
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Scatter Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!