필터 지우기
필터 지우기

Add extra marker to the plot?

조회 수: 2 (최근 30일)
Steven
Steven 2014년 1월 1일
댓글: Walter Roberson 2014년 1월 2일
Happy New Year!
How can I add extra marker to a plot with several curves?
I mean suppose that the plot with several curves has already the legend with different markers. Now I want to add extra marker to some of the curves.
How can I do so?
Thanks!
Steven
  댓글 수: 1
dpb
dpb 2014년 1월 1일
What does "extra" mean in this context, specifically?

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

채택된 답변

Walter Roberson
Walter Roberson 2014년 1월 1일
편집: Walter Roberson 2014년 1월 1일
If you plot() with a linespec that has only a marker (or a marker and color) then the lines will not be drawn. Also scatter() will draw only markers.
plot(x, y, 'ro') %red circles but no line
  댓글 수: 2
Steven
Steven 2014년 1월 2일
Thank!
But how can we have second legend?
Walter Roberson
Walter Roberson 2014년 1월 2일
You would have to custom construct the second legend by creating an axes to put it in, drawing the sample lines, positioning the text, and so on.
Or alternately, you could put an second axis before the first and attach a legend to that second axis.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by