[討論] 如何畫兩種顏色的errorbar
我想要畫兩種顏色的errorbar
也就是這個
GG=[2 6 5 1 3 5 4 0 1
5 1 2 3 5 6 4 5 1];
x = 1:length(GG);
y = mean(GG);
e = std(GG);
zero=zeros(1,length(GG));
h = figure; errorbar(x,y,zero,e,'linestyle','none');
hold on; bar(x, y'); hold off;
還有這一個
GG=[2 6 5 1 3 5 4 0 1
5 1 2 3 5 6 4 5 1];
HH=[1 3 5 2 6 4 1 5 1
2 6 1 1 5 6 1 2 3];
SS=[mean(GG);mean(HH)];
x=1:length(GG);
g = figure;
bar(x, SS');
的合體
視情況還要增加到三種顏色 四種顏色 所以希望有簡單一點的寫法
請問該怎麼做呢?? 謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 60.244.170.68
※ 編輯: ReiFu21 來自: 60.244.170.68 (12/04 10:36)