フィルターのクリア

How to delete extra legend on the graph using Figure properties

10 ビュー (過去 30 日間)
John Long Soon
John Long Soon 2018 年 9 月 23 日
コメント済み: Walter Roberson 2020 年 1 月 6 日
Dear Everyone,
I have a question regarding how to manipulate the graph legends based on the settings from the figure properties. please find the attached files. I would like to know how can I manually delete the extra legend lines for this case.
Thank you, if someone can answer me this question.
Regards, John
  2 件のコメント
Jitesh Dadich
Jitesh Dadich 2020 年 1 月 6 日
Hey,
Did you find any solution ?
suggest me if you have found some, I am also facing same problem.
Walter Roberson
Walter Roberson 2020 年 1 月 6 日
What happened when you tried using the method I described of changing the String property?
Note: there are methods that are more reliable, if you do not insist on proceeding by using the Property Inspector.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 9 月 23 日
Click on the String property. The legend will expand to a list of raw character vectors without quotes, one per line. Remove appropriate lines that you do not want to appear, understanding that if you delete any in the middle then that line will not be skipped, that the entries will "fall down" in the list to cover earlier lines. Leaving a blank line might or might not work: the next lines might or might not "fall down", and certainly the corresponding line entry will not be omitted from the legend.
It seems semi-reliable to remove entries this way once per legend without using code to change the properties of the legend.
After you have done this once, you will have trouble adding entries back in. The syntax to use for the text box is not at all clear, and if you experiment you will probably wedge the legend to the point where you would need to delete it and recreate it to get legend entries to work properly.
  2 件のコメント
John Long Soon
John Long Soon 2018 年 9 月 25 日
Hi Walter,
Sorry for the late replying, I tried to search the string property on the Legend properties (please see attachments). However, I cannot found this configuration settings. If you can pointed out me which settings path I can entry the String property, that would be nice.
Thank you Walter
Walter Roberson
Walter Roberson 2018 年 9 月 25 日
Look in the Labels section of the inspector: it is the second main grouping. String is the second property there, below the Autoupdate check box. It is the one that currently says "1x8 cell" in your image.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by