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!
