Plot with dot and different colors

545 ビュー (過去 30 日間)
LOKESH
LOKESH 2012 年 5 月 13 日
I am using plot function where i need dots.Also I want to change colors?How can I do it.
plot(x,y,'.');
Above function plot the dots but how I change the dots color red or green,etc The following doesn't work:
plot(x,y,'.','r:');
Suggest any answer or solution..
  1 件のコメント
Alexander Reina Garzon
Alexander Reina Garzon 2022 年 10 月 17 日
plot(x,y,'r.')
plot(x,y,'o')
plot(x,y,'m')

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

採用された回答

Walter Roberson
Walter Roberson 2012 年 5 月 13 日
plot(x,y,'r.')
You may wish to consider using scatter()

その他の回答 (2 件)

Nadeem Tariq Beigh
Nadeem Tariq Beigh 2020 年 6 月 8 日
編集済み: Nadeem Tariq Beigh 2020 年 6 月 8 日
plot(x,y,'ro');//To plot a red circle
plot(x,y,'r.);//To plot ared dot

Goutham Saravanan
Goutham Saravanan 2021 年 9 月 21 日
x = linspace(1*pi,100);
y = ;
plot(x,y,'ro');
xlabel('x')
ylabel('Likelihood ratio for the given conditions')
title('1.2/c')

カテゴリ

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