www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/LabelContourPlotandReturnObjectHandlesExample.m
%% Set Contour Label Text Properties After Creation % Label the contour lines at level 2 and 6. Return the text and line % objects created. % Copyright 2015 The MathWorks, Inc. %% [x,y,z] = peaks; [C,h] = contour(x,y,z); tl = clabel(C,[2,6]); %% % The output |tl| is a vector that contains one text object and one line % object for each contour label. disp(tl) %% % Change the font size for one of the labels. Starting in R2014b, you can % use dot notation to set properties. If you are using an earlier release, % use the <docid:matlab_ref.f67-432995> function instead. tl(2).FontSize = 20;