我有使用bar
和顏色映射的問題。matlab酒吧顏色表返回所有酒吧相同的顏色
我有這樣一個CSV文件,其中包含完成時間爲六個方面的工作:
34,22,103,22,171,26
24,20,41,28,78,28
37,19,60,23,141,24
...
和我創建條形圖與手段,並添加STD變化errorbar。
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)));
爲什麼輸出是這樣的?爲什麼酒吧有相同的顏色?我怎麼把傳說放到六個酒吧?