Scatter3 does not display points correctly
Show older comments
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 Comments
Jan
on 2 May 2019
[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
Answers (1)
Jan
on 2 May 2019
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
1 Comment
Joanna Szlapczynska
on 5 May 2019
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!