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

    %% Line Style, Marker Symbol, and Color Options  
% Create a 3-D stem plot of cosine values between $-\pi$ and $\pi$. Use a
% dashed line style for the stem, set the marker symbols to stars, and set
% the color to magenta.

%%  
figure
X = linspace(-pi,pi,40);
Z = cos(X);
stem3(Z,'--*m')    

%%
% To specify only two of the three |LineSpec| options, omit the third
% option from the character vector. For example, |'*m'| sets the marker
% symbol and the color and uses the default line style.