get
Query graphics object properties
Syntax
Description
get(
displays the properties and property
values for the specified graphics object h
)h
in the Command Window.
h
must be a single object. If h
is empty ([ ]),
get
does nothing and does not return an error or warning.
returns the values of the specified properties for the specified graphics object
v
= get(h
,propertyNames
)h
.
If
h
is a single object andpropertyNames
is a string or character vector that specifies one property,get
returns the value of the specified property. Ifh
is a single object andpropertyNames
is a cell array that specifies one or more properties,get
returns a1
-by-n cell array containing the values of the specified properties, where n is the number of properties inpropertyNames
.If
h
is a vector of objects,get
returns an m-by-n cell array containing the values of the specified properties, where m is the number of elements inh
and n is the number of properties contained inpropertyNames
.
returns the default value of the specified property and object type for the specified
graphics object v
= get(h
,defaultTypeProperty
)h
. defaultTypeProperty
is the word
default
concatenated with the object type (for example,
Figure
) and the property name (for example, Color
)
in quotes. For example, v = get(groot,"defaultFigureColor")
returns the
default value of the Color
property of Figure
objects
for the graphics root object, groot
.
returns the factory-defined value of the specified property and object type for the graphics
root object, v
= get(groot,factoryTypeProperty
)groot
. factoryTypeProperty
is the
word factory
concatenated with the object type (for example,
Figure
) and the property name (for example, Color
)
in quotes. For example, v = get(groot,"factoryFigureColor")
returns the
factory-defined value of the Color
property of Figure
objects.
Examples
Input Arguments
Output Arguments
Version History
Introduced before R2006a