필터 지우기
필터 지우기

Update Legend with varying values (variables) part2

조회 수: 2 (최근 30일)
GettinStarted
GettinStarted 2020년 7월 4일
답변: Nikhil Sonavane 2020년 7월 14일
Hello,
I have a hard time to figure this configuration out. This time a little bit more precise:
Legend should look like this
Tricky?
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 7월 4일
Your legend(sprintf('curve%d',n)) does not appear to be within the loop?
And if it is, then so is the legend('unit cell')
GettinStarted
GettinStarted 2020년 7월 5일
Hi Walter,
thanks for the answer.
The legends should correspond to:
The yellow marked ones do appear an the loop.
My goal is to achieve a legend like this.

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

채택된 답변

Nikhil Sonavane
Nikhil Sonavane 2020년 7월 14일
As Walter suggested, your legend command should be in a loop to recurrsively update the legend in your figure. Variable Tpc_22 appears in the loop but only its last value is considered by the legend command while including legend in your figure. I would suggest you to use the legend command in the loop as well.

추가 답변 (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