How to add standard errors in bar charts (hatched)?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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');
0 commentaires
Réponses (1)
Alessandro La Chioma
le 5 Août 2017
Hi
and, much better, superbar function in file exchange https://de.mathworks.com/matlabcentral/fileexchange/57499-superbar
0 commentaires
Voir également
Catégories
En savoir plus sur Bar Plots dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!