Scatter3 does not display points correctly

Hello,
I have a problem with scatter3 function. It seems to display 3D points not correctly.
For the line of code:
scatter3([0.001069, 1.001552, 0.999379, 0.090724],[0.000001, 0.013140, 0.033245, 0.996423],[1.003260, 0.070949, 0.049154, 0.010725],100,'.')
it does display 4 points, but Z value of none of these points exeeds 1.0! See the figure below:
What is strange, the Z axis is automatically correctly set to min 0 and max 1.2.
Please help.
Thank you in advance,
J. Szlapczynska

2 个评论

Try to change the viewing angle...the z value is as expected.
[MOVED from section for comments] Joanna wrote:
Thank you very much, indeed changing by hand the viewing angle did help!
Anyway, still I think that the view with initial displaying angle is wrong and might be misleading.
Kind regards,
Joanna

请先登录,再进行评论。

回答(1 个)

I do not see any problem in the screenshot and do not understand, what you consider as "wrong" or "misleading".
Which axis do you call "Z-Axis"? The one with the "Goal func #3" label? The length of the axis is determined automatically by the scaling, not only by the values of the displayed points. Try:
axis equal
pause(2)
axis tight

类别

在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息

产品

版本

R2018a

标签

Community Treasure Hunt

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

Start Hunting!

Translated by