matlab画图

figure;
t = plot(1:20, oa_sm_all(1:20),'k-^', 1:20, 0.01* ac_emp(1)*ones(20,1), 'r' ,1:20, 0.01*ac(1)*ones(20,1), 'b'  ) ; 
set(t, 'LineWidth', 2);
xlabel('\lambda', 'FontSize', 16)
ylabel('Overall Accuracy',  'FontSize', 16)
h_legend = legend('SVM+Graph Laplacian', 'EMP+SVM' , 'SVM');
set(h_legend,'FontSize',12);
axis([1  20   0.01*ac(1)-0.002   max(oa_sm_all) + 0.002 ] );

set(gca,'FontSize',12);


section 2:

在迭代中,显示某些量随迭代次数的变化情况。

figure; 

for i=1:n

...

plot(x,'r.'),  drawnow

end


%%%%  保持成清晰些的pdf格式图像

h = figure; 
color = {'r.', 'g*', 'b^', 'ms', 'k>' } ;
for i= 1:5
    ind = ( label == i ) ;
    im =  ydata( ind, : ) ;
    plot( im(:,1), im(:,2), color{i} ) ;
    hold on ;
end
h_legend = legend('0', '1' , '2', '3', '4' );
print(h,'-dpdf','Figure2.pdf')                             % 这里存成 名为 Figure2.pdf 的 文件,  



%%%% saveas

legend( 'Location', 'best' ) ;
saveas(gca, '.mypic.pdf', 'pdf') ;

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值