フィルターのクリア

How to change the color of a single point in a scatter plot?

24 ビュー (過去 30 日間)
Irina
Irina 2013 年 7 月 26 日
コメント済み: Jonatan Dias 2017 年 9 月 23 日
I am plotting points:
x = [ 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5];
y = [ 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5];
plot(x,y,'*')
I would like to change the color of just an individual point, how do I go about it?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 7 月 26 日
x = [ 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5];
y = [ 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5];
plot(x,y)
hold on
scatter(x(7),y(7),'r')
hold off
  3 件のコメント
bhavesh k.pacherwal
bhavesh k.pacherwal 2017 年 6 月 11 日
thanks sir
Jonatan Dias
Jonatan Dias 2017 年 9 月 23 日
Thank you very much. God bless you.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by