making a plot kinda of like an errorbar plot

조회 수: 1 (최근 30일)
Adam Jurhs
Adam Jurhs 2022년 5월 16일
편집: Voss 2022년 5월 17일
hi guys,
i want to make a plot that sort of looks like an error bar plot but without the mean value, just the top and bottom data points. it would be great if the errorbar plot would let me give the command errorbar(x,y_lower,y_upper,' ') but of course that doesnt work. so i was thinking about doing something like:
plot(x1, y_lower1,y_upper1,'o') and somehow connecting them with a line, and then hold on, and then plot(x2, y_lower2,y_upper2,'o') ... and then somehow looping over plot statements for all the elements in my data set? but i can't get this to work either?
would this be the right way to do it? or is there a plot type that would be easier to use? (and have me asking fewer questions about)

답변 (1개)

Voss
Voss 2022년 5월 16일
Something like this?
x = 1:10;
y = zeros(1,10);
err = randn(1,10);
errorbar(x,y,err,'LineStyle','none')
xlim([0 11])
  댓글 수: 5
Voss
Voss 2022년 5월 17일
@Adam Jurhs Comment posted as "Answer" moved here
awesome!!! that worked. THANKS i've been pulling my hair out all morning trying to figure this thing out - arrrgh
i need more ecxperience learning some of the non-typical plotting functions MatLab has built-in
Voss
Voss 2022년 5월 17일
편집: Voss 2022년 5월 17일
Great! You're welcome!
Please mark my answer as Accepted if you don't mind!

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

카테고리

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by