📄 exa5_30.m
字号:
%先创建橘黄色划线,线的颜色[1,0.5,0]:
x=-2*pi:pi/40:2*pi; % create data
y=sin(x); % find the sine of x
Hl_sin=plot(x,y) % plot sine and save line handle
set(Hl_sin,'Color',[1 .5 0],'LineWidth',3) % Change the color and width
%现在加一个浅蓝色的cosine曲线:
z=cos(x); % find the cosine of x
hold on % keep the sine curve
Hl_cos=plot(x,z); % plot the cosine and save the handle
set(Hl_cos, 'Color',[.75 .75 1]) % color it light blue
hold off
%加上一个标题并且使字体比正常大一些:
title( 'Handle Graphics Example' ) % add a title
Ht_text=get(gca,'Title' ) % get a handle to the title
set(Ht_text,'FontSize',16) % customize the font size
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -