| Description |
A 3D scatter plot of a Cartesian data set is drawn. The data points are sorted by color so that plot3 is called once for each group of points that map to the same color. Execution time is significantly reduced for large data sets. By default the points are colored according to their distance from the XY plane. This can changed with the 'ColorData' property. Additionally the upper and lower limits of the color range can be specified. This is useful for creating a series of plots with the same coloring.
The example plot is produced by the following code.
figure('color','white');
[x,y,z] = peaks(101);
c = gradient(z);
k = hypot(x,y)<3;
plot3k({x(k) y(k) z(k)},...
'ColorData',c(k),'ColorRange',[-0.5 0.5],'Marker',{'o',2},...
'Labels',{'Peaks','Radius','','Intensity','Lux'},...
'PlotProps',{'FontSize',12});
Plot3k is based on plot3c by Uli Theune.
|