Creation of figure using multiple error bars for the same data series

조회 수: 4 (최근 30일)
Ioannis Voultsos
Ioannis Voultsos 2022년 2월 11일
답변: Voss 2022년 2월 11일
Dear all,
I am trying to create a MATLAB figure, in which, a dataseries (9 x-y variable sets) is plotted together with:
(i) The standard deviation of the dataseries
(ii) The 2x standard deviation of the dataseries
(iii) The min and max values observed in the dataseries.
A sample plot is presented below:
For plotting, I am using the errorbar function. When plotting the standard deviation and the 2x standard deviation errors, I use different markers, so, although the error bars overlap until the 1x standard deviation, then there is a difference between lines, so they can be clearly depicted on the graph.
However, for the min and max values, I use the errorbar(x,y,yneg,ypos), syntax. Since it considers the height above the data series, I am using the values: yneg=y-yneg,actual and ypos=ypos,actual-y, where y,neg, y,pos, and y are the corresponding negative, positive and actual value for the 9 positions. Although this method shows the min and max values, as I want, it overlaps with the 2x standard deviation dataseries. Therefore, the three error bars cannot be distinguished from each other.
Is there a way of starting the min and max error bars at the point of 2x standard deviation ones or changing the line style at this point onwards?
Thank you very much,
Ioannis.

답변 (1개)

Voss
Voss 2022년 2월 11일
Maybe try creating the min/max bars first, then the 2x std, then the std, so that the tallest bars are on the bottom and the shortest are on the top.

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by