Worry about scatter3 plot
2 ビュー (過去 30 日間)
古いコメントを表示
Idossou Marius Adom
2021 年 1 月 7 日
コメント済み: Idossou Marius Adom
2021 年 1 月 8 日
Hi all. Wish you good and happy new year !
I plot data in 3-D in Matlab with the scatter3 command. It works well, but the figure bothers me a bit, and this is why:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/481398/image.png)
The z coordinate for the point BDI is 32.4 and that of the point TGO is 30.6. My concern is that both points seem to be under the z = 30 line, and TGO even seems to be slightly higher than BDI although its z coordinate is lower. I am conscious that view in 3-D is not that easy and som deformations may happen. For example, in 2-D there is no problem:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/481403/image.png)
Does my worry make sens ? And in the case, is there any way to better plot the figure in 3-D ? Here is my code (for the 3-D figure):
figure
scatter3(Data.kfprop,Data.mpropkf*100,Data.abd,'marker','none');
dx = -1.5;
text(Data.kfprop+dx,Data.mpropkf*100,Data.abd,Data.isocode3);
xl = xlabel('X');
xl.HorizontalAlignment = 'left';
xl.Rotation = 16;
xl.Position(3) = xl.Position(3)+0;
yl = ylabel('Y');
yl.HorizontalAlignment = 'right';
yl.Rotation = -27;
yl.Position(1) = yl.Position(1)+0;
zlabel('Z');
Thank you for your help.
0 件のコメント
採用された回答
Cris LaPierre
2021 年 1 月 7 日
It's an optical illusion because your axes are rotated/tilted. This is causing the grid line in the back (for Z=30) to appear higher than your data points. You could try rotating your plot to try and find a better viewing angle (or use the view function).
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!