|
本帖最后由 matlab的旋律 于 2017-4-1 18:04 编辑
今天做计步算法准确率分析的时候,想到用柱状图来做对比,感觉还可以,在此开帖mark一下。具体测试者的名字我就不写啦,红色效果最好,耶就是我自己写的算法
clear all
close all
clc
y = [0.9688 0.9569 0.97 0.985 0.99
0.9856 0.9456 0.9575 0.9133 0.98375
0.965 0.925 0.97 0.985 0.9925
0.9713 0.8427 0.995 0.9925 0.99502
0.9181 0.7731 0.975 0.9908 0.98438
0.9181 0.7731 0.975 0.9908 0.98701
0.9206 0.8187 0.9525 0.8475 0.92063
0.9206 0.8187 0.9525 0.8475 0.97875
0.9244 0.9194 0.9194 0.9725 0.98562
0.9612 0.7769 0.9486 0.9678 0.97844
0.935 0.7762 0.9625 0.9183 0.975
0.9608 0.9769 1 0.9826 0.98817
0.9575 0.9038 0.9425 0.9867 0.99188
0.9163 0.8587 0.9425 0.8942 0.94188
0.9069 0.8775 0.9875 0.9792 0.99188
0.9144 0.835 0.925 0.5983 0.98687];
x = [1:size(y,1)]';
bar_handle = bar(x,y);
xlim([0.5,size(y,1)+0.5])
ylim([0.5,1.06])
legend('a','b','c','d','e')
box off
xlabel('tester')
ylabel('accuracy rate')
set(gca,'xTick',[1:size(y,1)])
set(gca,'xticklabel',{'天','地','玄','黄','宇','宙','洪','荒','日','月','盈','昃','辰','宿','列','张'});%对应的xtick上换上label
bar_handle(1).FaceColor = 'green';%修改对应柱状条的颜色
bar_handle(2).FaceColor = 'magenta';
bar_handle(3).FaceColor = 'blue';
bar_handle(4).FaceColor = 'black';
bar_handle(5).FaceColor = 'red';
hold on
plot([0.5:size(y,1)+0.5],repmat(0.9403,1,17),'g-+')
plot([0.5:size(y,1)+0.5],repmat(0.8611,1,17),'m--')
plot([0.5:size(y,1)+0.5],repmat(0.961,1,17),'b-o')
plot([0.5:size(y,1)+0.5],repmat(0.9283,1,17),'k-.')
plot([0.5:size(y,1)+0.5],repmat(0.9795,1,17),'r-*')
title('individual accuracy rate distribution')
grid on
box on
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|