How do I get rid of lines connecting error bars?

45 次查看(过去 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:
Fig 1.jpeg
% 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'});

采纳的回答

Star Strider
Star Strider 2018-12-14
Specify a marker only in your errorbar call:
errorbar(valuesfrex,errex,'.');

更多回答(1 个)

类别

Help CenterFile Exchange 中查找有关 Errorbars 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by