How to only keep the legends I want

조회 수: 2 (최근 30일)
Mohammad Shojaei Arani
Mohammad Shojaei Arani 2023년 3월 5일
댓글: Mohammad Shojaei Arani 2023년 3월 6일
Hello,
open Figure1.fig
I have a simple question. The best and fastest way is to explain the problem using a figure (see the attached Figure1).
As you see, I only want to keep 3 out of 9 legends here. I really do not want to do such things by coding. I only want
to do this manually. When I open 'Property inspector' I see a part caled 'string' which is a 9*1 cell. I removed 6 of them. So,
now 6 labels are removed. Hoever, unfortunately I find it rather difficult to also remove the corresponding lines (or dashed lines, I
do not know what to call it). So, When a user wants to remove the 'label' or legend 'string' MATLAB should by default remove it
completely (I do not understand whay this is not the default!!!).
I appreciate your kind help!
Thanks in advance,
Babak
  댓글 수: 1
Matt J
Matt J 2023년 3월 5일
When a user wants to remove the 'label' or legend 'string' MATLAB should by default remove it completely (I do not understand whay this is not the default!!!).
What if the user wanted to deviate from your default, so that the legend entry did contain an empty string? How would you enable that?

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

채택된 답변

Matt J
Matt J 2023년 3월 5일
편집: Matt J 2023년 3월 5일
Go into the Parent/Child properties of the locus you want removed from the legend and set HandleVisibility to 'off'.
  댓글 수: 3
Matt J
Matt J 2023년 3월 6일
You're welcome, but please Accept-click the Answer to indicate that it worked.
Mohammad Shojaei Arani
Mohammad Shojaei Arani 2023년 3월 6일
Sorry Matt. I just forgot. I do it now.
Thanks a lot!

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

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