Plot with dot and different colors

조회 수: 368 (최근 30일)
LOKESH
LOKESH 2012년 5월 13일
댓글: Alexander Reina Garzon 2022년 10월 17일
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 CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by