How to add standard errors in bar charts (hatched)?

2 次查看(过去 30 天)
I have got 4 categories (say A,B,C,D) each having 3 values i.e. bar_3_categories=[1 2 3 4;1 2 3 4;1 2 3 4]; Error bars are error_bars=[0.1 0.2 0.3 0.4;0.4 0.5 0.6 0.7;0.7 0.8 0.9 0.1]; I got hatched histogram charts (please refer coding) but unable to add std. error at bars (each bar can be of black boundary). Please help me to add std errors in these graphs
close all clc; % Create original plot fH = gcf; colormap(jet(4)); A=[1 2 3 4;1 2 3 4;1 2 3 4]; h = bar(A); legend('Apple', 'Orange', 'Banana', 'Melon');
% Apply Brandon's function tH = title('Brandon''s applyhatch'); applyhatch_pluscolor(fH, '\-x.', 0, [1 0 1 0], jet(4));
% Apply Brian's function set(tH, 'String', 'Brian''s applyhatch'); applyhatch_plusC(fH, '\-x.', 'rkbk');
set(tH, 'String', 'Original');

回答(1 个)

Alessandro La Chioma
Hi
and, much better, superbar function in file exchange https://de.mathworks.com/matlabcentral/fileexchange/57499-superbar

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by