Color coded 3D scatterplot

버전 1.8.0.0 (5.91 KB) 작성자: Ken Garrard
Produces a 3D scatterplot of XYZ data with varying colors
다운로드 수: 21.7K
업데이트 날짜: 2014/12/25

라이선스 보기

A 3D scatter plot of a Cartesian data set is drawn. The data points are sorted by color and plot3 is called once for each group of points that map to the same color. This reduces execution time significantly 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)}, ...
'Plottype','stem','FontSize',12, ...
'ColorData',c(k),'ColorRange',[-0.5 0.5],'Marker',{'o',2}, ...
'Labels',{'Peaks','Radius','','Intensity','Lux'});

Plot3k is based on plot3c by Uli Theune.

인용 양식

Ken Garrard (2026). Color coded 3D scatterplot (https://kr.mathworks.com/matlabcentral/fileexchange/9519-color-coded-3d-scatterplot), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Scatter Plots에 대해 자세히 알아보기
도움

도움 받은 파일: plot3c

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.8.0.0

Added a stem3 style with colored lines from the xy plane
Updated for R2014b graphics

1.7.0.0

This update excludes points with NaN color values from the plot.

1.6.0.0

Updated treatment of NextPlot property as suggested by Val.

1.4.0.0

Bug fix for 'ColorData', 'ColorRange' properties.

1.3.0.0

Optional arguments are property,value pairs. Input data can be a cell array, vector or matrix.

1.1.0.0

The color range and markersize arguments have been added. The figure handle is not returned unless an output argument is given.

1.0.0.0