root object

Purpose

Root object properties.

Description

The root is a handle 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 figure windows.

The root object exists when you start MATLAB; you never have to create it. Use the set function to alter the root's properties, listed under "Object Properties" below. Use get to query the root's properties.

Object Properties

This section lists property names along with the type of values each accepts.

BlackAndWhite
Automatic hardware checking flag.
on Assume the display is monochrome. This is useful if MATLAB is running on color hardware, but is displaying on a monochrome terminal. Prevents MATLAB from determining erroneously that the display is color.
off (Default.) Differentiate between color and monochrome.
ButtonDownFcn
Callback string.
Any legal MATLAB expression, including the name of an M-file or function. When you select the object, the string is passed to the eval function to execute the Callback. Initially the empty matrix.
CaptureMatrix
Matrix of screen data.
A read-only matrix that contains the image data of the region enclosed by the CaptureRect rectangle. Use the get function to obtain this matrix. Use image to display the captured matrix.
CaptureRect
Size and position of rectangle to capture.
A four-element vector, [left,bottom,width,height], that defines the region captured by CaptureMatrix. left and bottom define the location of the lower-left corner of the rectangle and width and height define the dimensions of the rectangle. The Units property determines what units are used to specify these dimensions. Initial value is [0 0 0 0].
Children
Handles of child objects.
A read-only vector containing the handles of all figure objects.
Clipping
Data clipping.
on (Default.) No effect for root objects.
off No effect for root objects.
CurrentFigure
Current figure window.
The handle of the current figure.
Diary
Diary file mode (see also diary command).
on MATLAB maintains a file (with name DiaryFile) that saves a copy of all keyboard input and most of the resulting output.
off (Default.) MATLAB does not save input and output to a file.
DiaryFile
Diary file name.
A string containing the name of the diary file. The default name is diary.
Echo
Script echoing mode (see also echo command).
on MATLAB displays each line of a script file as it executes.
off (Default.) MATLAB does not echo during script execution.
Format
Output format mode (see also format command).
short (Default.) Fixed-point format with 5 digits.
shortE Floating-point format with 5 digits.
long Scaled fixed-point format with 15 digits.
longE Floating-point format with 15 digits.
bank Fixed-format of dollars and cents.
hex Hexadecimal format.
+ Displays + and - symbols.
FormatSpacing
Output format spacing (see also format command).
compact Suppress extra line feeds for more compact display.
loose (Default.) Display extra line feeds for looser display.
Interruptible
Callback interruptibility.
yes The callback specified by ButtonDownFcn is interruptible by other callbacks.
no (Default.) The ButtonDownFcn callback is not interruptible.
Parent
Handle of parent object.
A read-only property that always contains the empty matrix, as the root object has no parent.
PointerLocation
Current location of pointer.
A read-only vector containing the x- and y-coordinates of the pointer position, measured from the lower-left corner of the screen. 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. This location may change by the time the value is returned.
PointerWindow
Handle of window containing the pointer.
A read-only property containing the handle of the figure window that contains the pointer. If the pointer is not in a MATLAB window, the value of the property is 0.
ScreenDepth
Screen depth.
An integer specifying the screen depth in bits.
ScreenSize
Screen size.
A four-element read-only vector, [left,bottom,width,height], that defines the display size. left and bottom are always 0. width and height are the screen dimensions in units specified by the Units property.
TerminalOneWindow
Indicates if there is only one window on your terminal.
yes There is only one window on your terminal.
no Multiple windows.
If the terminal uses only one window, MATLAB waits for you to press a key before it switches from graph mode back to command mode. This property is only used by the terminal graphics driver.
TerminalProtocol
Terminal type.
x X display server. If you are using X Windows and MATLAB can connect to your X display server, this property is automatically set to x.
tek401x Terminals that emulate Tektronix 4010/4014.
tek410x Terminals that emulate Tektronix 4100/4105.
none Not in terminal mode, not connected to an X server.
Once this property is set, it cannot be changed unless you quit and restart MATLAB.
Type
Type of graphics object.
A read-only string; always 'root' for the root object.
Units
Unit of measurement.
pixels (Default.) Screen pixels.
normalized Normalized coordinates, where the lower-left corner of the screen maps to (0,0) and the upper-right corner to (1.0,1.0).
inches Inches.
cent Centimeters.
points Points. Each point is equivalent to 1/72 of an inch.
This property affects CaptureRect, PointerLocation, and ScreenSize. If you change the value of Units, it is good practice to return it to its default value after completing your computation so as not to affect other functions that assume Units is set to the default value.
UserData
User-specified data.
Any matrix you want to associate with the root object. The object does not use this data, but you can retrieve it using the get command.
Visible
Object visibility.
on (Default.) No effect for root objects.
off No effect for root objects.

See Also

diary, echo, figure, format, gcf

(c) Copyright 1994 by The MathWorks, Inc.