www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/AdjustBaselinePropertiesExample.m

    %% Adjust Baseline Properties  
% Create a stem plot and change properties of the baseline.   

% Copyright 2015 The MathWorks, Inc.


%% 
X = linspace(0,2*pi,50);
Y = exp(0.3*X).*sin(3*X);
h = stem(X,Y);
 

%% 
% Change the line style of the baseline. 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.
hbase = h.BaseLine; 
hbase.LineStyle = '--';     

%% 
% Hide the baseline by setting its |Visible| property to |'off'| . 
hbase.Visible = 'off';