カラーマップの使用に問題がbar
あります。
6 つのタスクの完了時間を含む次のような csv ファイルがあります。
34,22,103,22,171,26
24,20,41,28,78,28
37,19,60,23,141,24
...
平均の棒グラフを作成し、標準偏差エラーバーを追加します。
res = csvread('sorting_results.csv');
figure();
y = mean(res)';
e = std(res);
hold on;
bar(y);
errorbar(y,e,'.r');
title('Sorting completion time');
ylabel('Completion time (seconds)');
xlabel('Task No.');
hold off;
colormap(summer(size(y,2)));
なぜこのような出力になるのですか?棒の色が同じなのはなぜですか?また、凡例を 6 つの小節に配置するにはどうすればよいですか?