这个作图和python还是有点区别的,似乎对命令输入的顺序还有要求。
t=[1190.2
1153.14
1071.56
1069.22
1063.18
];
w=10:10:50;
% scatter(w,t,sz,'r','filled');
plot(w,t,'o--','linewidth',2)
hold on
t1=[1073.02
1057.81
1129.7
1028.18
1015.6
];
plot(w,t1,'*--','linewidth',2) %调整线宽,先给线的类型,再给线宽
hold on
legend('72 slots','48 slots')
xlabel('Fre(kHz)')
ylabel('ironLoss(W)')
set(gca,'fontsize',15,'fontname','Times'); %设置坐标轴字体
saveas(gcf,'iron72to48.png')
%实心点画线,找了半天代码
plot(ep,selected_tra,'o-','color',[0 0.4470 0.7410],'MarkerFaceColor', [0 0.4470 0.7410])
hold on
plot(ep,selected_vali,'o-','color',[0.8500 0.3250 0.0980],'MarkerFaceColor', [0.8500 0.3250 0.0980])
xlabel('Epoch')
ylabel('Loss')
legend('Train','Validation')