svm matlab 画图,matlab 画图

字体- FontName

字体大小 - FontSize

设置坐标轴字体 直接在图后 set(gca,'FontSize',20)

设置legend    L

L = legend(['FeatureBagging, Auc = ',num2str(Ave.auc(time,2))],['ActiveOutlier, Auc = ',num2str( Ave.auc(time,3))],['LOF, Auc = ',num2str(  Ave.auc(time,4))],['ParzenWindow, Auc = ',num2str(  Ave.auc(time,5))],['L21, Auc = ',num2str(  Ave.auc(time,6))],['L20-4, Auc = ',num2str(

set(L,'Fontname','times new Roman','fontsize',15)

常用字体 - 'times new Roman'

Title

title(['\fontsize{12}\fontname{宋体}汉字 \fontname{Times new roman}this is English,这是汉字,Hello World 123'])

6a93892db265

sbuplot 加一个大标题

suptitle('title')

6a93892db265

Bar

figure()

b = bar([Accuracy_SVM;Accuracy_DBSCAN;Accuracy_LOF])

hx = [0.8 1 1.2 1.8 2 2.2 2.8 3 3.2]-0.08 % 纵坐标

hy = reshape(cell2mat(get(b,'YData')),1,9)+0.01;

str ={};

限制坐标轴的范围

坐标轴的显示范围?可用axis函数

% 二维

axis([xmin xmax ymin ymax]) %xmin是x最小,xmax是x最大,ymin,ymax类似

% 三维

axis([xmin xmax ymin ymax zmin zmax])

for i=1:length(hy)

str{i} = num2str(hy(i));

end

% 添加标签

text(hx, hy(:)+0.01,str);

title(strcat('Accuracy'))

legend('RP','PCA','Autoencoder')

set(gca,'XTickLabel',{'SVM','DBSCAN','LOF'})

saveas(gcf,strcat(path,'\Synthesis_Accuracy_RobotFailure.fig'))

saveas(gcf,strcat(path,'\Synthesis_Accuracy_RobotFailure.pdf'))

save(strcat(path,'\Info_Synthesis_Accuracy_RobotFailure.mat','Accuracy_SVM','Accuracy_DBSCAN','Accuracy_LOF','AUC_SVM','AUC_LOF'))

set(gca, 'LineWidth',1) % 设置当前图片外围线宽

6a93892db265

对于Bar上方的数据位置除了get外有他方法么? 目前我是自己调的

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值