matlab 画图参考小程序

ⅰ亾dé卋堺 提交于 2021-02-14 23:18:06
x=0.1:0.1:0.9;  
 a=[41.37,44.34,44.34,44.66,44.66,44.66,98.85,98.85,98.85];%xxxxxx
 b=[22.10,22.39,22.39,29.77,29.77,29.77,86.01,86.01,86.01]; %xxxxxx
 plot(x,a,'-or',x,b,'-sb','LineWidth',1);    
axis([0.1,0.9,0,100])  
set(gca,'XTick',[0.1:0.1:0.9])
set(gca,'YTick',[0:10:100])
legend('文献[54]','本文');   
xlabel('期望值','FontSize',10,'FontWeight','bold')  
ylabel('聚合率(%)','FontSize',10,'FontWeight','bold')
set(gca,'linewidth',1)

 

 

 

 

 

 

x=100:100:600;%x轴上的数据,第一个值代表数据开始,第二个值代表间隔,第三个值代表终止
 a=[1.496,1.558,1.576,1.598,1.644,1.695]; %a数据y值
 b=[1.63,1.684,1.733,1.764,1.833,1.899]; %b数据y值
 c=[1.779,1.921,2.002,2.09,2.171,2.232]; %b数据y值
 plot(x,a,'-*b',x,b,'-or',x, c,'-+g','linewidth',1); %线性,颜色,标记
axis([100,600,1.45,2.25])  %确定x轴与y轴框图大小
set(gca,'XTick',[100:100:600]) %x轴范围1-6,间隔1
set(gca,'YTick',[1.45:0.125:2.25]) %y轴范围0-700,间隔100
legend('Two nodes','There nodes','Four nodes');   %右上角标注
xlabel('Number of iTrees')  %x轴坐标描述
ylabel('Speedup')
set(gca,'linewidth',1)

 

 

 

 

 

 

 

 x=100:100:600;%x轴上的数据,第一个值代表数据开始,第二个值代表间隔,第三个值代表终止
 a=[0.505,1.393,2.276,3.135,4.031,5.028]; %a数据y值
 b=[0.695,0.783,0.88,0.997,1.09,1.167]; %b数据y值
 c=[0.58,0.673,0.838,0.887,0.973,0.987]; %b数据y值
 plot(x,a,'-*b',x,b,'-or',x, c,'-+g','linewidth',1); %线性,颜色,标记
axis([100,600,0.5,5.25])  %确定x轴与y轴框图大小
set(gca,'XTick',[100:100:600]) %x轴范围1-6,间隔1
set(gca,'YTick',[0.5:0.75:5.25]) %y轴范围0-700,间隔100
legend('iforest','iforestMapReduce','iforestSpark');   %右上角标注
xlabel(' Number of iTrees ')  %x轴坐标描述
ylabel('Operation time(min)')
set(gca,'linewidth',1)

 

 

 

 

x=100:100:600;%x轴上的数据,第一个值代表数据开始,第二个值代表间隔,第三个值代表终止
 a=[0.733,2.039,3.329,4.565,5.891,7.383]; %a数据y值
 b=[1.58,1.647,1.73,1.813,1.917,1.98]; %b数据y值
 c=[0.647,0.72,0.837,0.91,0.99,1.05]; %b数据y值
 plot(x,a,'-*b',x,b,'-or',x, c,'-+g','linewidth',1); %线性,颜色,标记
axis([100,600,0.5,7.5])  %确定x轴与y轴框图大小
set(gca,'XTick',[100:100:600]) %x轴范围1-6,间隔1
set(gca,'YTick',[0.5:0.75:7.5]) %y轴范围0-700,间隔100
legend('iforest','iforestMapReduce','iforestSpark');   %右上角标注
xlabel(' Number of iTrees ')  %x轴坐标描述
ylabel('Operation time(min)')
set(gca,'linewidth',1)

 

 

 

 

 

 

x=100:100:600;%x轴上的数据,第一个值代表数据开始,第二个值代表间隔,第三个值代表终止
 a=[1.007,2.815,4.591,6.31,8.153,10.132]; %a数据y值
 b=[2.543,2.703,2.803,2.933,3.15,3.25]; %b数据y值
 c=[0.733,0.82,0.893,0.947,1.047,1.107]; %b数据y值
 plot(x,a,'-*b',x,b,'-or',x, c,'-+g','linewidth',1); %线性,颜色,标记
axis([100,600,0.5,10.5])  %确定x轴与y轴框图大小
set(gca,'XTick',[100:100:600]) %x轴范围1-6,间隔1
set(gca,'YTick',[0.5:2:10.5]) %y轴范围0-700,间隔100
legend('iforest','iforestMapReduce','iforestSpark');   %右上角标注
xlabel(' Number of iTrees ')  %x轴坐标描述
ylabel('Operation time(min)')
set(gca,'linewidth',1)

 

 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!