Plotting confidence interval with bar plot
조회 수: 8 (최근 30일)
이전 댓글 표시
Hi all,
I have the following graph, and I want to plot the mean and standard deviation (in grey) such that the these lines fit exactly to my x-axis bars. I would really like the grey shaded region to be a straight horizontal line in the region behind hte bars themselves, and only "slope" in the spaces between. Is there a way that I can do this?
댓글 수: 4
채택된 답변
추가 답변 (1개)
Gaurav Garg
2020년 6월 12일
Hey Amy,
The grey shaded region seem to have varying y-values for the respective x-values.
What is evident from your code is that norm_WT_std2_SH_allInfo is an array of dimensions m*3, and borders of the shaded region are plotted using the second and third columns of the array. So, I would suggest you to look into the values in this array and change them (if needed) to make your grey shaded region to be a straight horizontal region.
The needed changes can be understood as -
You can plot any line parallel to x-axis if the y-value at each x-point for the line is 0.
댓글 수: 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!