用Matlab画柱状图

 x=[60.82,17.51,12.83;43.59,8.32,2.29;101.78,13.2,6.12;78.35,21.58,16.34]


x =


   60.8200   17.5100   12.8300
   43.5900    8.3200    2.2900
  101.7800   13.2000    6.1200
   78.3500   21.5800   16.3400

>> b=bar(x)


b =


  174.0044  177.0039  179.0039


>> ch=get(b,'children');
>> set(gca,'XTickLabel',{'upload image','download image','download pdf'})
>> set(gca,'XTickLabel',{'upload image','download image','download pdf','upload pdf'})
>> legend('Bluetooth','QR codes','Direct Migrater')
>> xlabel('tasks')

>> ylabel('time(sec)')

>> set(gca,'yGrid','on') %显示水平方向的网格

用Matlab画柱状图_第1张图片


你可能感兴趣的:(Matlab)