Plot a 4D data with color scale

6 ビュー (過去 30 日間)
Calvin Koh
Calvin Koh 2018 年 11 月 3 日
コメント済み: Calvin Koh 2018 年 11 月 3 日
I have a data x,y,z,D where x,y,z represent the coordinate which the D should be plotted at. How can I plot a color map on a 3 axis figure where the color of the point is dependent on the value D.
For example
a = [1 2 3; 1 2 1; 1 1 4]
D = [9.3e-07; 8.05e-06; 9.2e-08]
So at position 1,2,3, maybe the point is yellow since 9.3e-07 is inbetween 8.05e-06 and 9.2e-08. At position 1,2,1, maybe the point is red since it is the largest value and at 1,1,4, it is blue since it is the smallest value.
Thank you!

採用された回答

Walter Roberson
Walter Roberson 2018 年 11 月 3 日
scatter3(x, y, z, pointsize, D)
You might also want to colormap() to choose a different color table.
  1 件のコメント
Calvin Koh
Calvin Koh 2018 年 11 月 3 日
Thank you!!!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by