LineWidth | 线条宽度 |
MarkerEdgeColor | 边界颜色 |
MarkerFaceColor | 填充颜色 |
MarkerSize | 点型大小 |
这里的Marker仅限于点型,包括圆圈、方块、菱形、五角星、六角星、三角形。
用法举例:plot(x,y,'o','LineWidth',12,'MarkerEdgeColor','k')
对坐标轴设置:axis[xmin xmax ymin ymax]; axis auto默认;axis manual 固定刻度,用于hold on状态;axis tight只绘制包含数据点的坐标部分;axis ij坐标原点设置在左上角;axis xy恢复默认;axis equal,axis image横纵坐标相同,后者还有axis tight 功能;axis square图形窗口设置为正方形;axis normal重置;axis off取消背景;axis on显示坐标轴以及背景;axis(h,..)对指定坐标轴设置
网格设置:grid on/off;grid在on和off之间自动切换;grid(h,...);grid minor(网格最小)
图像保持:hold on/off; hold;
文本标注:text(x,y,'string')在(x,y)处添加string文本;text(x,y,'string','PropertyName','PropertyValue'...)在指定位置添加文本并设置属性。用法举例:text(0,0,'这是原点\rightarrow','fontsize',10,'HorizontalAlignment','right') ‘\rightarrow’表示右箭头,HorizontalAlignment表示文本与图像的对齐方式,可以自行测试发现区别。
图例:legend('string'...);legend(h,'string'...);legend(M)M是字符串数组或矩阵;legend('off\on');legend(h,'off');legend('hide')隐藏图例;legend('show');legend('boxoff/boxon')图例的背景操作;legend(...'Location',location);
legend(...,'Orientation','orientation')指定多个图例的排列方向