This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Open Property Inspector


inspect -close


inspect opens the Property Inspector. Use the Property Inspector to display and modify properties of an object. Select an object in a figure window or the Layout Editor. To select an object in a figure window, plot edit mode must be on. If you do not select an object, then the Property Inspector is blank.

inspect(h) displays the properties for the object, h, where h can be most handle objects. For example, specify h as a MATLAB® graphics object or a Simulink® object.

inspect([h1,h2,...]) displays properties that objects h1 and h2 have in common. If there are no such properties, inspect displays a blank window. You can inspect and edit any number of objects, for example, objects returned by the bar function.

inspect -close closes the Property Inspector.

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 (MATLAB 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


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 MATLAB graphics objects. For example, the Parent and Children properties are not shown.

inspect h displays a Property Inspector window that enables modification of the character vector 'h', not the object 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);
f = surf(Z);

In the Property Inspector, change the FaceAlpha property from 1.0 to 0.4. Setting this value in the Property Inspector is equivalent to the command, f.FaceAlpha = 0.4, which changes the transparency of the surface faces to 40%.

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 =

Introduced before R2006a

Was this topic helpful?