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

    %% Set Marker Type  

% Copyright 2015 The MathWorks, Inc.


%% 
% Initialize the random-number generator to make the output of |rand| repeatable.
% Define vectors |x| and |y| as cosine and sine values with random noise.  
rng default
z = linspace(0,4*pi,250);
x = 2*cos(z) + rand(1,250);
y = 2*sin(z) + rand(1,250);  

%% 
% Create a 3-D scatter plot and set the marker type. Use |view| to change
% the angle of the axes in the figure. 
figure
scatter3(x,y,z,'*')
view(-30,10)