Clear Filters
Clear Filters

Legend handling in Matlab figure.

22 views (last 30 days)
mirza
mirza on 21 Oct 2015
Answered: mirza on 21 Oct 2015
Dear All, I need assistance related to legends of Matlab figure. I have only the figure which i have plotted through time-consuming simulation. While, i was trying to adjust the legends, that stopped me to go further in my work. I am trying to list my problem in statement, hope readers will get understand to give answer to this.
  1. I have figure with five lines.
  2. two figures have different colours and three have same color and line styles.
  3. I want to edit legend by only specifying three lines only.
  4. in plot browser, First two legends are showing right, however, the third line of interest legend is coming at the end, which i want to take at third place.5) i want to delete the remaining two legends from the legend box but not the lines from the plot.

Accepted Answer

mirza
mirza on 21 Oct 2015
Problem solved, For this you have to go for "Plot browser" then select the lines which you want to display, add the titles of the lines. If you want to remove any line from the legend then go to "More properties" to open "Inspector-axes", here you will find "string" beneath it there would be written tag of legend. open for editing this string, here you will find all the entries which are displaying in the legend window. You can edit and delete the legend entries from here.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!