필터 지우기
필터 지우기

How can I give my fit plot the same color as the data points?

조회 수: 8 (최근 30일)
jeferia_tue
jeferia_tue 2016년 12월 15일
댓글: jeferia_tue 2016년 12월 15일
Of course, a similar question was asked already here . But it didn't fit for my problem. What I have is:
fig1 = figure(1)
plot(x1,y1,'.','markersize',14, 'markeredgecolor', [0 0 1]);
plot(x1,polyval(fit1,x1,'-'), 'markeredgecolor', [0 0 1]);
But doesn't matter wich color code I type in, Matlab changes the color of the fitplot graph. How can I solve this problem?

채택된 답변

Ahmet Cecen
Ahmet Cecen 2016년 12월 15일
Not super clear description, a picture would help but:
Are you sure you don't mean to use the 'Color' property instead of 'markeredgecolor' for the second plot?
  댓글 수: 1
jeferia_tue
jeferia_tue 2016년 12월 15일
oh man.....yes..of course...this was the problem.^^ Thank you.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by