MATLAB Functions Help Desk

root object

Purpose

Root object properties

Description

The Root is a graphics object that corresponds to the computer screen. There is only one Root object and it has no parent. The children of the Root object are Figures.

The Root object exists when you start MATLAB; you never have to create it and you cannot destroy it. Use set and get to access the Root properties, which are described in the "Root Properties" section.

Object Hierarchy



Root Properties

This section lists property names along with the type of values each accepts. Curly braces { } enclose default values.

BusyAction             cancel | {queue}

Not used by the Root object.

ButtonDownFcnstring

Not used by the Root object.

CallbackObject         handle (read only)

Handle of current callback's object. This property contains the handle of the object whose callback routine is currently executing. If no callback routines are executing, this property contains the empty matrix [ ]. See also the gco command.

CaptureMatrix           (obsolete)

This property has been superseded by the getframe command.

CaptureRect            (obsolete)

This property has been superseded by the getframe command.

Children               vector of handles

Handles of child objects. A vector containing the handles of all non-hidden Figure objects. You can change the order of the handles and thereby change the stacking order of the Figures on the display.

Clipping               {on} | off

Clipping has no effect on the Root object.

CreateFcn

The Root does not use this property.

CurrentFigure          Figure handle

Handle of the current Figure window, which is the one most recently created, clicked in, or made current with the statement:

which restacks the Figure to the top of the screen, or

which does not restack the Figures. In these statements, h is the handle of an existing Figure. If there are no Figure objects,

returns the empty matrix. Note, however, that gcf always returns a Figure handle, and creates one if there are no Figure objects.

DeleteFcn              string

Since you cannot delete the Root object, this property is not used.

Diary                  on | {off}

Diary file mode. When this property is on, MATLAB maintains a file (whose name is specified by the DiaryFile property) that saves a copy of all keyboard input and most of the resulting output. See also the diary command.

DiaryFile              string

Diary filename. The name of the diary file. The default name is diary.

Echo                   on | {off}

Script echoing mode. When Echo is on, MATLAB displays each line of a script file as it executes. See also the echo command.

ErrorMessage           string

Text of last error message. This property contains the last error message issued by MATLAB.

Format                 short | {shortE} | long | longE | blank | hex |
+ | rat

Output format mode. This property sets the format used to display numbers. See also the format command.

FormatSpacing          compact | {loose}

Output format spacing (see also format command).

HandleVisibility       {on} | callback | off

This property is not useful on the Root object.

Interruptible          {on} | off

This property is not useful on the Root object.

Parent                 handle

Handle of parent object. This property always contains the empty matrix, as the Root object has no parent.

PointerLocation        [x,y]

Current location of pointer. A vector containing the x- and y-coordinates of the pointer position, measured from the lower-left corner of the screen. You can move the pointer by changing the values of this property. The Units property determines the units of this measurement.

This property always contains the instantaneous pointer location, even if the pointer is not in a MATLAB window. A callback routine querying the PointerLocation can get a different value than the location of the pointer when the callback was triggered. This difference results from delays in callback execution caused by competition for system resources.

PointerWindow          handle (read only)

Handle of window containing the pointer. MATLAB sets this property to the handle of the Figure window containing the pointer. If the pointer is not in a MATLAB window, the value of this property is 0. A callback routine querying the PointerWindow can get the wrong window handle if you move the pointer to another window before the callback executes. This error results from delays in callback execution caused by competition for system resources.

Profile                on | {off}

M-file profiler on or off. Setting this property to on activates the profiler when you execute the M-files named in ProfileFile. The profiler determines what percentage of time MATLAB spends executing each line of the M-file. See also the profile command.

ProfileFile            M-file name

M-file to profile. This property contains the full path name of the M-file to profile.

ProfileCount           vector

Profiler output. This property is a n-by-1 vector, where n is the number of lines of code in the profiled M-file. Each element in this vector represents the number of times the profiler found MATLAB executing a particular line of code. The ProfileInterval property determines how often MATLAB profiles (i.e., determines which line is executing).

ProfileInterval        scalar

Time increment to profile M-file. This property sets the time interval at which the profiler checks to see what line in the M-file is executing.

ScreenDepth            bits per pixel

Screen depth. The depth of the display bitmap (i.e., the number of bits per pixel). The maximum number of simultaneously displayed colors on the current graphics device is 2 raised to this power.

ScreenDepth supersedes the BlackAndWhite property. To override automatic hardware checking, set this property to 1. This value causes MATLAB to assume the display is monochrome. This is useful if MATLAB is running on color hardware, but is displaying on a monochrome terminal. Such a situation can cause MATLAB to determine erroneously that the display is color.

ScreenSize             4-element rectangle vector (read only)

Screen size. A four-element vector,

that defines the display size. left and bottom are 0 for all Units except pixels, in which case left and bottom are 1. width and height are the screen dimensions in units specified by the Units property.

Selected               on | off

This property has no effect on the Root level.

SelectionHighlight     {on} | off

This property has no effect on the Root level.

ShowHiddenHandles      on | {off}

Show or hide handles marked as hidden. When set to on, this property disables handle hiding and exposes all object handles, regardless of the setting of an object's HandleVisibility property. When set to off, all objects so marked remain hidden within the graphics hierarchy.

Tag                    string

User-specified object label. The Tag property provides a means to identify graphics objects with a user-specified label. You can set Tag to any string.

TerminalHideGraphCommandstring X-Windows only

Hide graph window command. This property specifies the escape sequence that MATLAB issues to hide the graph window when switching from graph mode back to command mode. This property is used only by the terminal graphics driver. Consult your terminal manual for the correct escape sequence.

TerminalOneWindow       {on} | off X-Windows only

One window terminal. This property indicates whether there is only one window on your terminal. If the terminal uses only one window, MATLAB waits for you to press a key before it switches from graphics mode back to command mode. This property is used only by the terminal graphics driver.

TerminalDimensions     pixels X-Windows only

Size of default terminal. This property defines the size of the terminal.

TerminalProtocol       none | x | tek401x | tek410x X-Windows only

Type of terminal. This property tells MATLAB what type of terminal you are using. Specify tek401x for terminals that emulate Tektronix 4010/4014 terminals. Specify tek410x for terminals that emulate Tektronix 4100/4105 terminals. If you are using X Windows and MATLAB can connect to your X display server, this property is automatically set to x.

Once this property is set, you cannot change it unless you quit and restart MATLAB.

TerminalShowGraphCommandstring X-Windows only

Display graph window command. This property specifies the escape sequence that MATLAB issues to display the graph window when switching from command mode to graph mode. This property is only used by the terminal graphics driver. Consult your terminal manual for the appropriate escape sequence.

Type                   string (read only)

Class of graphics object. For the Root object, Type is always 'root'.

Units                  {pixels} | normalized | inches | centimeters |
 points

Unit of measurement. This property specifies the units MATLAB uses to interpret size and location data. All units are measure from the lower-left corner of the screen. Normalized units map the lower-left corner of the screen to (0,0) and the upper right corner to (1.0,1.0). inches, centimeters, and points are absolute units (one point equals 1/72 of an inch).

This property affects the PointerLocation and ScreenSize properties. If you change the value of Units, it is good practice to return it to its default value after completing your operation so as not to affect other functions that assume Units is set to the default value.

UserData               matrix

User specified data. This property can be any data you want to associate with the Root object. MATLAB does not use this property, but you can access it using the set and get functions.

Visible                {on} | off

Object visibility. This property has no effect on the Root object.

See Also



[ Previous | Help Desk | Next ]