error bars on grouped barplot with 2 axis
古いコメントを表示
Hello, I have the following barplot:
clear all
clc
close all
(Separated off the brute force clear/close so folks can download w/o fear of wiping their own workspace -- dpb)
set(groot,'defaultAxesTickLabelInterpreter','latex');
set(groot,'defaulttextinterpreter','latex');
set(groot,'defaultLegendInterpreter','latex');
a = [37.6 0; 29.9 0];
b = [0 1.4 ; 0 1.1 ];
a(:,2)=zeros;
b(:,1)=zeros;
yyaxis left;
bar(1:2,a);
ylim([0 40]);
yyaxis right;
bar(1:2,b);
ylim([0 2]);
set(gca,'XTickLabel',{'part 1';'part 2';'part 1';'part 2'})
yyaxis left
ylabel('time/s')
yyaxis right
ylabel('mean/mm')
I want to add errorbars for the blue bars belonging to the left axis and the same for the orange bars belonging to the right axis.

採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Errorbars についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
