Plotting 4 dimensions in 1 graph (4th D being color)

3 ビュー (過去 30 日間)
Daniel van den Heuvel
Daniel van den Heuvel 2016 年 6 月 9 日
回答済み: xiaoshu liu 2020 年 5 月 29 日
I want to plot 4 dimensions in a 3D-graph with x, y and z being random variables from a certain range I used to calibrate a model. The fourth dimension would be the model efficiency I calculated for each combination of x,y,z and represented by color. So, I have 4 vectors with equal lengths.
I managed to do so using the scatter3 command, but I would like the plot to be continuous and be like a 3D body rather than scattered dots. I tried using contour3, but I don't quite get what the dimensions of x,y,z and c should be to use it. Should I use contour3 for this purpose and how should I manipulate x,y,z and c for it to work with contour 3?
Thanks!

回答 (1 件)

xiaoshu liu
xiaoshu liu 2020 年 5 月 29 日
scatter3(x,y,z,5,c,'filled');
where 5 is the size of your marker
c is automatically linearly mapped to the colormap.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by