Worry about scatter3 plot
조회 수: 2 (최근 30일)
이전 댓글 표시
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!