Scatter3: How can I change the size of a particular marker?

164 ビュー (過去 30 日間)
Michael Lin
Michael Lin 2019 年 10 月 7 日
コメント済み: Michael Lin 2019 年 10 月 7 日
Hi all,
I want to draw a scatter3 figure and add a point on top of it but make it bigger and filled with red.
Here's my code:
hold on;
scatter3(1stArray(:,1),1stArray(:,2),1stArray(:,3)); % draw scatter plot with all the points in the cell array
scatter3(x, y, z, 30); % I'm trying to make this point bigger by specifying the size to be 30, but it doesn't do anything.
Can I get some help?
Thanks

採用された回答

the cyclist
the cyclist 2019 年 10 月 7 日
編集済み: the cyclist 2019 年 10 月 7 日
This puzzled me for a bit -- until I read the documentation a bit more carefully.
For scatter3, the marker size specified is the area of the marker. (In other plot types such as the plot command, it is the width of the marker.)
The default marker area is 36 points squared, so you actually made it a bit smaller.
N = 50;
figure
hold on
scatter3(rand(N,1),rand(N,1),rand(N,1))
scatter3(0.5,0.5,0.5,3000) % I made your value a lot bigger
  1 件のコメント
Michael Lin
Michael Lin 2019 年 10 月 7 日
Awesome. Thanks!!! No wonder it doesn't work :D

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by