发布时间:2025-12-09 15:58:35 浏览次数:3
| y | 黄色 | [1 1 0] |
| m | 品红色 | [1 0 1] |
| c | 青蓝色 | [0 1 1] |
| r | 红色 | [1 0 0] |
| g | 绿色 | [0 1 0] |
| b | 蓝色 | [0 0 1] |
| w | 白色 | [1 1 1] |
| k | 黑色 | [0 0 0] |
| - | 实线 |
| - - | 虚线 |
| : | 点线 |
| -. | 点划线 |
举例说明
x = 0:pi/100:2*pi;y1 = sin(x);y2 = sin(x-0.25);y3 = sin(x-0.5);y4 =sin(x-0.75);figureplot(x,y1,x,y2,'--',x,y3,':',x,y4,'-.')| o | 圆圈 |
| + | 加号 |
| * | 星号 |
| . | 点 |
| × | 叉号 |
| s | 方形 |
| d | 菱形 |
| ^ | 上三角 |
| v | 下三角 |
| > | 右三角 |
| < | 左三角 |
| p | 五角形 |
| h | 六角形 |
举例说明
x = 0:pi/100:2*pi;y1 = sin(x);y2 = sin(x-0.25);y3 = sin(x-0.5);y4 =sin(x-0.75);y5 = sin(x-1);y6 = sin(x-1.25);y7 = sin(x-1.5);y8 =sin(x-1.75);y9 =sin(x-0.75);y10 = sin(x-2);y11 = sin(x-2.25);y12 = sin(x-2.5);y13 =sin(x-2.75);figureplot(x,y1,'-o','MarkerIndices',1:5:length(y1));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y2,'-+','MarkerIndices',1:5:length(y2));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y3,'-*','MarkerIndices',1:5:length(y3));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y4,'-.','MarkerIndices',1:5:length(y4));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y5,'-x','MarkerIndices',1:5:length(y5));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y6,'-s','MarkerIndices',1:5:length(y6));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y7,'-d','MarkerIndices',1:5:length(y7));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y8,'-^','MarkerIndices',1:5:length(y8));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y9,'-v','MarkerIndices',1:5:length(y9));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y10,'->','MarkerIndices',1:5:length(y10));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y11,'-<','MarkerIndices',1:5:length(y11));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y12,'-p','MarkerIndices',1:5:length(y12));%创建一个线图并每隔四个数据点显示一个标记hold on;plot(x,y13,'-h','MarkerIndices',1:5:length(y13));%创建一个线图并每隔四个数据点显示一个标记hold on;