Description

set(H,Name,Value) specifies
a value for the property Name on the object identified
by H. Use single quotes around the property name,
for example, set(H,'Color','red'). If H is
a vector of objects, then set sets the property
for all the objects. If H is empty (that is, []), set does
nothing, but does not return an error or warning.

set(H,NameArray,ValueArray) specifies
multiple property values using the cell arrays NameArray and ValueArray.
To set n property values on each of m graphics
objects, specify ValueArray as an m-by-n cell
array, where m = length(H) and n is
equal to the number of property names contained in NameArray.

set(H,S) specifies multiple
property values using S, where S is
a structure whose field names are the object property names and whose
field values are the corresponding property values. MATLAB® ignores
empty structures.

s = set(H) returns the user-settable
properties and possible values for the object identified by H. s is
a structure array whose field names are the object's property names
and whose field values are the possible values of the corresponding
properties. If you do not specify an output argument, the MATLAB software
displays the information on the screen. H must
be a single object.

values = set(H,Name) returns
the possible values for the specified property. If the possible values
are strings, set returns each in a cell of the
cell array values. For other properties, set returns
a statement indicating that Name does not have
a fixed set of property values. If you do not specify an output argument, MATLAB displays
the information on the screen. H must be a single
object.

Set Different Values for Multiple Properties on Multiple Objects

Set the values of the Marker and Tag properties
on three different stem series objects to different values. Each row
of the value cell array corresponds to an object in h and
contains two values, one for the Marker property
and one for the Tag property.

More About

You can use any combination of property name/property value
pairs, structure arrays, and cell arrays in one call to set.

Setting Property Units

Note that if you are setting both the FontSize and
the FontUnits properties in one function call,
you must set the FontUnits property first so
that the MATLAB software can correctly interpret the specified FontSize.
The same applies to figure and axes units — always set the Units property
before setting properties whose values you want to be interpreted
in those units. For example,