3 dim plot, how to specify color for each point

Hello,
Suppose I want to plot 3-d sin(x+y), x = [0, pi], y = [0, pi]. I have a 3*n matrix to denote the RGB for each point. How to efficiently generate the plot?
Thanks,
Weizhou

 채택된 답변

Thorsten
Thorsten 2015년 10월 12일
편집: Thorsten 2015년 10월 12일

0 개 추천

x = linspace(0,pi);
y = x;
z = sin(x+y);
col = jet(numel(x)); % sample color from jet colormap
scatter3(x,y,z, [], col)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Color and Styling에 대해 자세히 알아보기

태그

질문:

2015년 10월 12일

편집:

2015년 10월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by