How to mark a point on scatter plot obtained using gscatter?

I just obtained a scatter plot using gscatter(x,y), where x and y are both data vectors with size 100. Among these 100 points, a point (x*,y*)=(50,50.5) have some particular meaning and I want to highlight this point with a different point style or color. How could I do it?
Thanks!

 採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2022 年 5 月 16 日
編集済み: KALYAN ACHARJYA 2022 年 5 月 16 日

1 投票

Yes you can specify that, see my example (Just for understanding)
x=randi(100,[1,50]);
y=randi(100,[1,50]);
gscatter(x,y);
hold on;
%....................... Group,color,marker,marker size
gscatter(x(1,25),y(1,25),2,'r','x',[10,15]);

4 件のコメント

Tmat
Tmat 2022 年 5 月 16 日
Thanks, KALYAN. This is very helpful!
KALYAN ACHARJYA
KALYAN ACHARJYA 2022 年 5 月 16 日
@Tmat I am glad to know that
Tmat
Tmat 2022 年 5 月 22 日
@KALYAN ACHARJYA Hi KALYAN, another question: what does x(1,25),y(1,25) mean?
KALYAN ACHARJYA
KALYAN ACHARJYA 2022 年 6 月 14 日
Specifying particular index points.

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

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by