Documentation Center

  • Trial Software
  • Product Updates


Open Property Inspector




inspect creates a separate Property Inspector window to enable the display and modification of the properties of any object you select in the figure window or Layout Editor. If no object is selected, the Property Inspector is blank.

inspect(h) creates a Property Inspector window for the object whose handle is h.

inspect([h1,h2,...]) displays properties that objects h1 and h2 have in common, or a blank window if there are no such properties; any number of objects can be inspected and edited in this way (for example, handles returned by the bar command).

The Property Inspector has the following behaviors:

  • Only one Property Inspector window is active at any given time; when you inspect a new object, its properties replace those of the object last inspected.

  • When the Property Inspector is open and plot edit mode is on, clicking any object in the figure window displays the properties of that object (or set of objects) in the Property Inspector.

  • When you select and inspect two or more objects of different types, the Property Inspector only shows the properties that all objects have in common.

  • To change the value of any property, click on the property name shown at the left side of the window, and then enter the new value in the field at the right.

The Property Inspector provides two different views:

  • List view — properties are ordered alphabetically (default); this is the only view available for annotation objects.

  • Group view — properties are grouped under classified headings (Handle Graphics® objects only)

To view alphabetically, click the "AZ" Icon in the Property Inspector toolbar. To see properties in groups, click

the "++" icon . When properties are grouped, the "-" and "+" icons are enabled; click to expand all categories and click to collapse all categories. You can also expand and collapse individual categories by clicking on the "+" next to the category name. Some properties expand and collapse

    Notes   To see a complete description of any property, right-click on its name or value and select What's This; a help window opens that displays the reference page entry for it.

    The Property Inspector displays most, but not all, properties of Handle Graphics objects. For example, the parent and children of HG objects are not shown.
    inspect h displays a Property Inspector window that enables modification of the string 'h', not the object whose handle is h.
    If you modify properties at the MATLAB® command line, you must refresh the Property Inspector window to see the change reflected there. Refresh the Property Inspector by reinvoking inspect on the object.


Example 1

Create a surface mesh plot and view its properties with the Property Inspector.

Z = peaks(30);
h = surf(Z);

In the Property Inspector, change the FaceAlpha property from 1.0 to 0.4 (equivalent to the command set(h,'FaceAlpha',0.4)). FaceAlpha controls the transparency of patch faces.

When you press Enter or click a different field, the FaceAlpha property of the surface object updates.

Example 2

Create a serial port object for COM1 on a Windows® platform and use the Property Inspector to peruse its properties:

s = serial('COM1');

Because COM objects do not define property groupings, the Property Inspector enables only the alphabetical list view of COM object properties.

Example 3

Create a COM Excel® server and open a Property Inspector window with inspect.

h = actxserver('excel.application');

Scroll down until you see the CalculationInterruptKey property, which by default is xlAnyKey. Click on the down-arrow in the right margin of the Property Inspector, and then select xlEscKey from the drop-down menu.

Check this property in the MATLAB Command Window using get to confirm that the property value changed.


ans =

See Also

| | | | |

Was this topic helpful?