Creation of figure using multiple error bars for the same data series
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/891335/image.jpeg)
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 Kommentare
Antworten (1)
Voss
am 11 Feb. 2022
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 Kommentare
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!