1.论文中图片绘制时,只能使用一种颜色黑色时
代码如下:
x = linspace(0,2*pi);
y1 = cos(x)-1;
y2 = cos(x);
y3 = sin(x)-1;
y4 = sin(x);
y5 = sin(x)+1;
figure
plot(x,y1,'k-','LineWidth',1.5)
hold on
plot(x,y2,'k--','LineWidth',1.5)
xlabel('\fontname{宋体}时间\fontname{Times}\itt/\rms');
ylabel('\fontname{宋体}角速度\fontname{Times}/rad·s^{-1}');
set(gca,'fontname','Times','fontsize',15);
figure
plot(x,y3,'k-x','LineWidth',1.5,'MarkerIndices',1:5:length(y3),'MarkerSize',8);
hold on
plot(x,y4,'k-o','LineWidth',1.5,'MarkerIndices',1:5:length(y4),'MarkerSize',8);
plot(x,y5,'k-^','LineWidth',1.5,'MarkerIndices',1:5:length(y5),'MarkerSize',8);
xlabel('\fontname{宋体}时间\fontname{Times}\itt/\rms');
ylabel('\fontname{宋体}角速度\fontname{Times}/rad·s^{-1}');
set(gca,'fontname','Times','fontsize',15);
注意:
\it 斜体 (如图中t)
\rm 常规字体(如图中s)
\fontname{specifier
} 字体名称
\fontsize{specifier
} 字体大小
更多见matlab xlabel 帮助文档