How do I get rid of lines connecting error bars?
조회 수: 44 (최근 30일)
이전 댓글 표시
Hello, I have the following code and resultant plot that, for some reason, produces lines to join each error bar.
I'd like to get rid of these joining lines and can't figure out how to do so. Any help is appreciated!
Here are my plot and code:

% average excitatory firing rates for each A and B and A v B pre v post
hold on
valuesfrex=[mean(FrAex) mean(FrBex) mean(FrABex) mean(FrA2ex) mean(FrB2ex) mean(FrAB2ex)];
errex=[semAex semBex semABex semA2ex semB2ex semAB2ex];
bar(valuesfrex);
errorbar(valuesfrex,errex);
set(gca,'XTick',1:6);
set(gca,'XTickLabel',{'Pre Ex A','Post Ex A','Pre Ex B','Post Ex B','Pre Ex AB','Post Ex AB'});
댓글 수: 0
채택된 답변
Star Strider
2018년 12월 14일
Specify a marker only in your errorbar call:
errorbar(valuesfrex,errex,'.');
댓글 수: 2
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Errorbars에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!