Skip to Main Content Skip to Search
Product Documentation

LegendEntryadd this object to the legend?

LegendEntry turns legend entries of individual objects on and off, if LegendVisible is TRUE.

→ Examples

Attribute

Type

Value

See Also:

Legend, LegendAlignment, LegendPlacement, LegendText, LegendVisible

See Also:

Section Legends in this document.

Details:

Example 1

By default, functions have LegendEntry = TRUE, while, e.g., lines do not:

plot(plot::Function2d(cos(x), x = 0..2*PI, Name = "cos(x)"),
     plot::Line2d([0, 1], [4, cos(4)], Name = "cos(0) .. cos(4)",
                  Color = RGB::Black),
     LegendVisible)

MuPAD graphics

Use LegendEntry to turn on the legend entry for the line:

plot(plot::Function2d(cos(x), x = 0..2*PI, Name = "cos(x)"),
     plot::Line2d([0, 1], [4, cos(4)], Name = "cos(0) .. cos(4)",
                  Color = RGB::Black, LegendEntry = TRUE),
     LegendVisible)

MuPAD graphics

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS