scatter plot with showing their means and error bars
조회 수: 52 (최근 30일)
이전 댓글 표시
Hello,
I would like to draw following graphs with Matlab. Any suggestions would be appreciated.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/343522/image.png)
댓글 수: 0
답변 (1개)
Sudheer Bhimireddy
2020년 8월 9일
doc errorbar
Look at the matlab example: "plot error bars with no line".
댓글 수: 2
Sudheer Bhimireddy
2020년 8월 10일
You can plot all your points in each category (from the image you posted, it seems that each x-tick is a category) and use 'hold on', then draw the plot with at mean values with errorbars.
plot(x1,z1,'ro','MarkerFaceColor','w'); %<- this shows all points
hold on;
errorbar(1,z1_mean,z1_std,'-ro','MarkerSize',10,...
'MarkerEdgeColor','r','MarkerFaceColor','r'); %<- this shows mean with standard deviation
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/343846/image.png)
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!