fill image imread fontsize ginput rotation saveas
bar3 plot3 zlabel meshgrid mesh surf view contour surfc
surfl zlim patch cylinder sphere camzoom camtarget light rotate shading
MATLAB绘图基础
%绘制一条直线,并返回其句柄值赋给变量h >> h = line([0 1],[0 1]) h=
0.0149 %获取句柄值为h的图形对象的所有属性名及相应属性值 >> get(h)
三、设置图形对象属性值
>> subplot(1, 2, 1); %绘制两个子图中的第1个 %绘制一条直线,并返回其句柄值赋给变量h1 >> h1 = line([0 1],[0 1]) ; >> text(0, 0.5, '未改变线宽') ; %在(0, 0.5)处加注释 >> subplot(1, 2, 2); %绘制两个子图中的第2个 %绘制一条直线,并返回其句柄值赋给变量h2 >> h2 = line([0 1],[0 1]) ; >> set(h2, 'LineWidth', 3) %设置线宽为3 >> text(0, 0.5, '已改变线宽') ; %在(0, 0.5)处加注释
gcf: 返回当前图形窗口的句柄(get current figure);
gco:返回当前被选定的图形对象的句柄(get current object).-先用鼠标选中感兴趣的对象。