MATLAB曲线标注、图例与加网格
MATLAB画好曲线之后
plot(x,y,‘linewidth’,2); %设置曲线粗细;
grid on; %加网格
text(x’,y’,’ \leftarrow 标注内容’); %(x’,y’)为曲线上一点,这段可实现在(x’,y’)点上添加标注,\leftarrow为左箭头可按需更改;
leg=legend(‘r=2mm’,‘r=4mm’,‘r=6mm’,‘r=8mm’,‘r=10mm’);
set(leg,‘FontSize’,30,‘Location’,‘northeastoutside’); %加入曲线图例,并设定图例属性。
%‘FontSize’,30:设定字体大小为30;‘Location’,‘northeastoutside’:设定图例摆放位置。
其中’Location’属性详解为:
‘north’ 坐标轴中的顶部
‘south’ 坐标轴中的底部
‘east’ 坐标轴中的右侧区域
‘west’ 坐标轴中的左侧区域
‘northeast’ 坐标轴中的右上角(二维坐标轴的默认值)
‘northwest’ 坐标轴中的左上角
‘southeast’ 坐标轴中的右下角
‘southwest’ 坐标轴中的左下角
‘northoutside’ 坐标轴的上方
‘southoutside’ 坐标轴的下方
‘eastoutside’ 到坐标轴的右侧
‘westoutside’ 到坐标轴的左侧
‘northeastoutside’ 坐标轴外的右上角(三维坐标轴的默认值)
‘northwestoutside’ 坐标轴外的左上角
‘southeastoutside’ 坐标轴外的右下角
‘southwestoutside’ 坐标轴外的左下角
‘best’ 坐标轴内与绘图数据冲突最少的地方
‘bestoutside’ 到坐标轴的右侧
‘none’ 由 Position 属性决定。可使用 Position 属性在自定义位置显示图例。
- 用matlab画简单曲线,并进行标注、图例、加网格,等操作
- matlab由离散点绘制光滑曲线并额外标注点
- 超全的matlab绘图实例及代码(曲线,曲面,饼状图,柱形图,网格图,球面等)
- MATLAB中画曲线网格
- matlab数据转换为字符串并合并字符串标注到图像曲线上
- 在MATLAB中的图例标注及实例说明
- MATLAB中标注图例
- matlab如何使用legend只标注某几条曲线
- 经济金融领域简单数学建模和分析:MATLAB成本曲线方程和销售收入直线方程
- matlab meshgrid函数 生成网格矩阵
- matlab绘制多曲线对比图
- matlab 画图中线型及颜色设置 matlab 作图 标注
- 怎么用matlab标记曲线上符合条件的点
- MATLAB学习笔记之-----图像写入硬盘与多曲线绘图
- matlab进行离散点的曲线拟合
- Matlab中数据处理和多项式插值与曲线拟合
- matlab如何控制坐标轴显示内容,而不改变曲线形状
- Python and Matlab绘制曲线图
- MATLAB利用散点进行函数曲线拟合
- matlab绘制平滑曲线