Skip to Main Content Skip to Search
Product Documentation

Namethe name of a plot object (for browser and legend)

The attribute Name sets the name of a graphical object. The object is displayed by this name in the legend and the interactive object browser of the graphics tool.

→ Examples

Attribute

Type

Value

See Also:

Function1, Function2, LegendText, Title

Details:

Example 1

The first two of the following function objects are given the names Sin and Cos, respectively. Generate the graphics and doubleclick on the plot. The two function objects are visible under their names in the object browser. The third function is just labeled as a 'Function2d' object. Also the legend uses this labeling:

plot(plot::Function2d(sin(x), x = -PI..PI, Name = "Sin",
                      Color = RGB::Red),
     plot::Function2d(cos(x), x = -PI..PI, Name = "Cos",
                      Color = RGB::Green),
     plot::Function2d(x/PI , x = -PI..PI, Color = RGB::Blue),
     LegendVisible = TRUE)

MuPAD graphics

Example 2

By default, an object does not have a Name entry:

f := plot::Function2d(cos(x), x=0..PI):
f::Name

FAIL

When creating a plot::Hatch object, the Name slot is set implicitly for the border function(s):

h := plot::Hatch(f):
f::Name

"Function2d(XMin = 0, XMax = PI, XName = x, Function = cos(x), XAxisTitle = \"x\")"

We plot the hatch with its bounding function:

plot(h, f)

MuPAD graphics

Doubleclick on the graphics and observe the way the objects are labeled in the object inspector.

delete f, h:

  


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