Creation of figure using multiple error bars for the same data series
조회 수: 4 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!