Documentation

Surface Properties

Primitive surface appearance and behavior

Surfaceproperties control the appearance and behavior ofSurfaceobjects. By changing property values, you can modify certain aspects of the surface chart.

Starting in R2014b, you can use dot notation to query and set properties.

s = surface; c = s.CData; s.CDataMapping = 'direct';

If you are using an earlier release, use thegetandsetfunctions instead.

Faces

expand all

Face color, specified as one of the values in this table.

Value Description
'flat'

Use a different color for each face based on the values in theCDataproperty. First you must specify theCDataproperty as a matrix the same size asZData. The color value at the first vertex of each face (in the positivexandydirections) determines the color for the entire face. You cannot use this value when theFaceAlphaproperty is set to'interp'.

'interp'

Use interpolated coloring for each face based on the values in theCDataproperty. First you must specify theCDataproperty as a matrix the same size asZData. The color varies across each face by interpolating the color values at the vertices. You cannot use this value when theFaceAlphaproperty is set to'flat'.

RGB triplet or color name

Use the specified color for all the faces. This option does not use the color values in theCDataproperty.

'texturemap' Transform the color data inCDataso that it conforms to the surface.
'none' Do not draw the faces.

An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range[0,1]; for example,[0.4 0.6 0.7]. Alternatively, you can specify some common colors by name. This table lists the long and short color name options and the equivalent RGB triplet values.

Option Description Equivalent RGB Triplet
'red'or'r' Red [1 0 0]
'green'or'g' Green [0 1 0]
'blue'or'b' Blue [0 0 1]
'yellow'or'y' Yellow [1 1 0]
'magenta'or'm' Magenta [1 0 1]
'cyan'or'c' Cyan [0 1 1]
'white'or'w' White [1 1 1]
'black'or'k' Black [0 0 0]

Face transparency, specified as one of these values:

  • Scalar in range[0,1]— Use uniform transparency across all the faces. A value of1is fully opaque and0is completely transparent. Values between0and1are semitransparent. This option does not use the transparency values in theAlphaDataproperty.

  • 'flat'— Use a different transparency for each face based on the values in theAlphaDataproperty. The transparency value at the first vertex determines the transparency for the entire face. First you must specify theAlphaDataproperty as a matrix the same size as theZDataproperty. TheFaceColorproperty also must be set to'flat'.

  • 'interp'— Use interpolated transparency for each face based on the values inAlphaDataproperty. The transparency varies across each face by interpolating the values at the vertices. First you must specify theAlphaDataproperty as a matrix the same size as theZDataproperty. TheFaceColorproperty also must be set to'interp'.

  • 'texturemap'— Transform the data inAlphaDataso that it conforms to the surface.

Effect of light objects on faces, specified as one of these values:

  • 'flat'— Apply light uniformly across each face. Use this value to view faceted objects.

  • 'gouraud'— Vary the light across the faces. Calculate the light at the vertices and then linearly interpolate the light across the faces. Use this value to view curved surfaces.

  • 'none'— Do not apply light from light objects to the faces.

To add a light object to the axes, use thelightfunction.

Note

The'phong'value has been removed. Use'gouraud'instead.

Face lighting when the vertex normals point away from camera, specified as one of these values:

  • 'reverselit'— Light the face as if the vertex normal pointed towards the camera.

  • 'unlit'— Do not light the face.

  • 'lit'— Light the face according to the vertex normal.

Use this property to discriminate between the internal and external surfaces of an object. For an example, seeBack Face Lighting.

Edges

expand all

Edges to display, specified as'both','row', or'column'.

Edge line color, specified as one of the values listed here. The default color of[0 0 0]corresponds to black edges.

Value Description
'none' Do not draw the edges.
'flat'

Use a different color for each edge based on the values in theCDataproperty. First you must specify theCDataproperty as a matrix the same size asZData. The color value at the first vertex of each face (in the positivexandydirections) determines the color for the adjacent edges. You cannot use this value when theEdgeAlphaproperty is set to'interp'.

'interp'

基于t使用插值为每个边缘着色he values in theCDataproperty. First you must specify theCDataproperty as a matrix the same size asZData. The color varies across each edge by linearly interpolating the color values at the vertices. You cannot use this value when theEdgeAlphaproperty is set to'flat'.

RGB triplet or color name

Use the specified color for all the edges. This option does not use the color values in theCDataproperty.

An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range[0,1]; for example,[0.4 0.6 0.7]. Alternatively, you can specify some common colors by name. This table lists the long and short color name options and the equivalent RGB triplet values.

Option Description Equivalent RGB Triplet
'red'or'r' Red [1 0 0]
'green'or'g' Green [0 1 0]
'blue'or'b' Blue [0 0 1]
'yellow'or'y' Yellow [1 1 0]
'magenta'or'm' Magenta [1 0 1]
'cyan'or'c' Cyan [0 1 1]
'white'or'w' White [1 1 1]
'black'or'k' Black [0 0 0]

Edge transparency, specified as one of these values:

  • Scalar in range[0,1]— Use uniform transparency across all of the edges. A value of1is fully opaque and0is completely transparent. Values between0and1are semitransparent. This option does not use the transparency values in theAlphaDataproperty.

  • 'flat'— Use a different transparency for each edge based on the values in theAlphaDataproperty. First you must specify theAlphaDataproperty as a matrix the same size as theZDataproperty. The transparency value at the first vertex determines the transparency for the entire edge. TheEdgeColorproperty also must be set to'flat'.

  • 'interp'— Use interpolated transparency for each edge based on the values inAlphaDataproperty. First you must specify theAlphaDataproperty as a matrix the same size as theZDataproperty. The transparency varies across each edge by interpolating the values at the vertices. TheEdgeColorproperty also must be set to'interp'.

Line style, specified as one of the options listed in this table.

Line Style Description Resulting Line
“- - -” Solid line

'--' Dashed line

':' Dotted line

'-.' Dash-dotted line

'none' No line No line

Line width, specified as a positive value in points. If the line has markers, then the line width also affects the marker edges.

Example:0.75

Sharp vertical and horizontal lines, specified as'off'or'on'.

If the associated figure has aGraphicsSmoothingproperty set to'on'and aRendererproperty set to'opengl', then the figure applies a smoothing technique to plots. In some cases, this smoothing technique can cause vertical and horizontal lines to appear uneven in thickness or color. Use theAlignVertexCentersproperty to eliminate the uneven appearance.

  • 'off'— Do not sharpen vertical or horizontal lines. The lines might appear uneven in thickness or color.

  • 'on'— Sharpen vertical and horizontal lines to eliminate an uneven appearance.

Note

You must have a graphics card that supports this feature. To see if the feature is supported, typeopengl info. If it is supported, then the returned fields contain the lineSupportsAlignVertexCenters: 1.

Effect of light objects on edges, specified as one of these values:

  • 'flat'— Apply light uniformly across the each edges.

  • 'none'— Do not apply lights from light objects to the edges.

  • 'gouraud'— Calculate the light at the vertices, and then linearly interpolate across the edges.

Note

The'phong'value has been removed. Use'gouraud'instead.

Markers

expand all

Marker symbol, specified as one of the values listed in this table. By default, the object does not display markers. Specifying a marker symbol adds markers at each data point or vertex.

Value Description
'o' Circle
'+' Plus sign
'*' Asterisk
'.' Point
'x' Cross
'square'or's' Square
'diamond'or'd' Diamond
'^' Upward-pointing triangle
'v' Downward-pointing triangle
'>' Right-pointing triangle
'<' Left-pointing triangle
'pentagram'or'p' Five-pointed star (pentagram)
'hexagram'or'h' Six-pointed star (hexagram)
'none' No markers

Marker size, specified as a positive value in points.

Example:10

Marker outline color, specified as'auto','flat', an RGB triplet, or one of the color options listed in the table.

  • 'auto'— Use the same color as theEdgeColorproperty.

  • 'flat'— Use theCDatavalue at the vertex to set the color.

For a custom color, specify an RGB triplet. An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range[0,1]; for example,[0.4 0.6 0.7]. Alternatively, you can specify some common colors by name. This table lists the long and short color name options and the equivalent RGB triplet values.

Option Description Equivalent RGB Triplet
'red'or'r' Red [1 0 0]
'green'or'g' Green [0 1 0]
'blue'or'b' Blue [0 0 1]
'yellow'or'y' Yellow [1 1 0]
'magenta'or'm' Magenta [1 0 1]
'cyan'or'c' Cyan [0 1 1]
'white'or'w' White [1 1 1]
'black'or'k' Black [0 0 0]
'none' No color Not applicable

Marker fill color, specified as'auto','flat', an RGB triplet, or one of the color options listed in the table.

  • 'auto'— Use the same color as theColorproperty for the axes.

  • 'flat'— Use theCDatavalue of the vertex to set the color.

For a custom color, specify an RGB triplet. An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range[0,1]; for example,[0.4 0.6 0.7]. Alternatively, you can specify some common colors by name. This table lists the long and short color name options and the equivalent RGB triplet values.

Option Description Equivalent RGB Triplet
'red'or'r' Red [1 0 0]
'green'or'g' Green [0 1 0]
'blue'or'b' Blue [0 0 1]
'yellow'or'y' Yellow [1 1 0]
'magenta'or'm' Magenta [1 0 1]
'cyan'or'c' Cyan [0 1 1]
'white'or'w' White [1 1 1]
'black'or'k' Black [0 0 0]
'none' No color Not applicable

This property affects only the circle, square, diamond, pentagram, hexagram, and the four triangle marker types.

Example:[0.3 0.2 0.1]

Example:'green'

Coordinate Data

expand all

x-coordinate data specified as a matrix that is the same size asZDataor a vector oflength(n), where[m,n] = size(ZData).

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|categorical|datetime|duration

Selection mode forXData, specified as one of these values:

  • 'auto'— Use the column indices ofZData.

  • 'manual'— Use manually specified value. To specify the value, pass an input argument to the plotting function or directly set theXDataproperty.

y-coordinate data specified as a matrix that is the same size asZDataor a vector oflength(m), where[m,n] = size(ZData).

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|categorical|datetime|duration

Selection mode forYData, specified as one of these values:

  • 'auto'— Use the row indices ofZData.

  • 'manual'— Use manually specified value. To specify the value, pass an input argument to the plotting function or directly set theYDataproperty.

z-coordinate data specified as a matrix.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|categorical|datetime|duration

Color and Transparency Data

expand all

Vertex colors, specified in one of these forms:

  • 2-D array — Use colormap colors. Specify a color for each vertex by settingCDatato an array the same size asZData. TheCDataMappingproperty determines how these values map into the current colormap. If theFaceColorproperty is set to'texturemap', thenCDatadoes not need to be the same size asZData. However, it must be of typedoubleoruint8. TheCDatavalues map to conform to the surface defined byZData.

  • 三维数组,使用真正的颜色。指定一个RGB triplet color for each vertex by settingCDatato an m-by-n-by-3 array where[m,n] = size(ZData). An RGB triplet is a three-element vector that specifies the intensities of the red, green, and blue components of a color. The first page of the array contains the red components, the second the green components, and the third the blue components of the colors. Since the surface uses true colors instead of colormap colors, theCDataMappingproperty has no effect.

    • IfCDatais of typedoubleorsingle, then an RGB triplet value of[0 0 0]corresponds to black and[1 1 1]corresponds to white.

    • IfCDatais an integer type, then the surface uses the full range of data to determine the color. For example, ifCDatais of typeuint8, then[0 0 0]corresponds to black and[255 255 255]corresponds to white. IfCDatais of typeint8, then[-128 -128 -128]corresponds to black and[127 127 127]corresponds to white.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64

Selection mode forCData, specified as one of these values:

  • 'auto'— Use theZDatavalues to set the colors.

  • 'manual'— Use manually specified values. To specify the values, set theCDataproperty.

Direct or scaled colormapping, specified as one of these values:

  • scaled— Transform the color data to span the portion of the colormap indicated by the axesCLimproperty, linearly mapping data values to colors. See thecaxisreference page for more information on this mapping.

  • direct— Use the color data as indices directly into the colormap. The color data should then be integer values ranging from 1 tolength(colormap). MATLAB®maps values less than 1 to the first color in the colormap, and values greater thanlength(colormap)to the last color in the colormap. Values with a decimal portion are fixed to the nearest lower integer.

Transparency data for each vertex, specified as an array the same size as theZDataproperty. After specifying the values, set theFaceAlphaandEdgeAlphaproperties to control the type of transparency. If theFaceAlphaandEdgeAlphaproperties are both set to scalar values, then the surface does not use theAlphaDatavalues.

TheAlphaDataMappingproperty determines how the surface interprets theAlphaDataproperty values.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|logical

Interpretation ofAlphaDatavalues, specified as one of these values:

  • 'none'— Interpret the values as transparency values. A value of 1 or greater is completely opaque, a value of 0 or less is completely transparent, and a value between 0 and 1 is semitransparent.

  • 'scaled'— Map the values into the figure’s alphamap. The minimum and maximum alpha limits of the axes determine theAlphaDatavalues that map to the first and last elements in the alphamap, respectively. For example, if the alpha limits are[3 5], then values of3or less map to the first element in the alphamap. Values of5or greater map to the last element in the alphamap. TheALimproperty of the axes contains the alpha limits. TheAlphamapproperty of the figure contains the alphamap.

  • 'direct'— Interpret the values as indices into the figure’s alphamap. Values with a decimal portion are fixed to the nearest lower integer.

    • If the values are of typedoubleorsingle, then values of 1 or less map to the first element in the alphamap. Values equal to or greater than the length of the alphamap map to the last element in the alphamap.

    • 如果整数类型的值,值的0 or less map to the first element in the alphamap. Values equal to or greater than the length of the alphamap map to the last element in the alphamap (or up to the range limits of the type). The integer types areuint8,uint16,uint32,uint64,int8,int16,int32, andint64.

    • If the values are of typelogical, then values of 0 map to the first element in the alphamap and values of 1 map to the second element in the alphamap.

Normals

expand all

Normal vectors for each surface vertex, specified as a m-by-n-by-3 array, where[m,n] = size(ZData). Specify one normal vector per vertex.

这个属性集assoc指定值iated mode to manual. If you do not specify normal vectors, then the surface generates this data for lighting calculations.

Data Types:single|double

Selection mode forVertexNormals, specified as one of these values:

  • 'auto'— Calculate the normal vectors based on the coordinate data.

  • 'manual'— Use manually specified values. To specify the values, set theVertexNormalsproperty.

Normal vectors for each surface face, specified as a (m-1)-by-(n-1)-by-3 array, where[m,n] = size(ZData). Specify one normal vector per face.

这个属性集assoc指定值iated mode to manual. If you do not specify normal vectors, then the surface generates this data for lighting calculations.

Data Types:single|double

Selection mode forFaceNormals, specified as one of these values:

  • 'auto'— Calculate the normal vectors based on the coordinate data.

  • 'manual'— Use manually specified values. To specify the values, set theFaceNormalsproperty.

Lighting

expand all

Strength of ambient light, specified as a scalar value in the range[0,1]. Ambient light is a nondirectional light that illuminates the entire scene. There must be at least one visible light object in the axes for the ambient light to be visible.

TheAmbientLightColorproperty for the axes sets the color of the ambient light. The color is the same for all objects in the axes.

Example:0.5

Data Types:double

Strength of diffuse light, specified as a scalar value in the range[0,1]. Diffuse light is the nonspecular reflectance from light objects in the axes.

Example:0.3

Data Types:double

Strength of specular reflection, specified as a scalar value in the range[0,1]. Specular reflections are the bright spots on the surface from light objects in the axes.

Example:0.3

Data Types:double

Size of specular spot, specified as a scalar value greater than or equal to 1. Most materials have exponents in the range[5 20].

Example:7

Data Types:double

Color of specular reflections, specified as a scalar value in the range[0,1]. A value of1sets the color using only the color of the light source. A value of0sets the color using both the color of the object from which it reflects and the color of the light source. TheColorproperty of the light contains the color of the light source. The proportions vary linearly for values in between.

Example:0.5

Data Types:double

Legend

expand all

Legend label, specified as a character vector or string. If you do not specify the text, then the legend uses a label of the form'dataN'. The legend does not display until you call thelegendcommand.

Example:'Label Text'

Data Types:char|string

This property is read-only.

Control for including or excluding the object from a legend, returned as anAnnotationobject. Set the underlyingIconDisplayStyleproperty to one of these values:

  • 'on'— Include the object in the legend (default).

  • 'off'— Do not include the object in the legend.

For example, exclude a stem chart from the legend.

p = plot(1:10,'DisplayName','Line Chart'); holdons = stem(1:10,'DisplayName','Stem Chart'); holdoffs.Annotation.LegendInformation.IconDisplayStyle ='off'; legend('show')

Alternatively, you can control the items in a legend using thelegendfunction. Specify the first input argument as a vector of the graphics objects to include.

p = plot(1:10,'DisplayName','Line Chart'); holdons = stem(1:10,'DisplayName','Stem Chart'); holdofflegend(p)

Interactivity

expand all

State of visibility, specified as one of these values:

  • 'on'— Display the object.

  • 'off'— Hide the object without deleting it. You still can access the properties of an invisible object.

Context menu, specified as aContextMenuobject. Use this property to display a context menu when you right-click the object. Create the context menu using theuicontextmenufunction.

Note

If thePickablePartsproperty is set to'none'or if theHitTestproperty is set to'off', then the context menu does not appear.

Selection state, specified as one of these values:

  • 'on'— Selected. If you click the object when in plot edit mode, then MATLAB sets itsSelectedproperty to'on'. If theSelectionHighlightproperty also is set to'on', then MATLAB displays selection handles around the object.

  • 'off'— Not selected.

Display of selection handles when selected, specified as one of these values:

  • 'on'— Display selection handles when theSelectedproperty is set to'on'.

  • 'off'— Never display selection handles, even when theSelectedproperty is set to'on'.

Clipping of the object to the axes limits, specified as one of these values:

  • 'on'— Do not display parts of the object that are outside the axes limits.

  • 'off'— Display the entire object, even if parts of it appear outside the axes limits. Parts of the object might appear outside the axes limits if you create a plot, sethold on, freeze the axis scaling, and then create the object so that it is larger than the original plot.

TheClippingproperty of the axes that contains the object must be set to'on'. Otherwise, this property has no effect. For more information about the clipping behavior, see theClippingproperty of the axes.

Callbacks

expand all

Mouse-click callback, specified as one of these values:

  • Function handle

  • Cell array containing a function handle and additional arguments

  • Character vector that is a valid MATLAB command or function, which is evaluated in the base workspace (not recommended)

使用这个属性来执行鳕鱼e when you click the object. If you specify this property using a function handle, then MATLAB passes two arguments to the callback function when executing the callback:

  • Clicked object — Access properties of the clicked object from within the callback function.

  • Event data — Empty argument. Replace it with the tilde character (~) in the function definition to indicate that this argument is not used.

For more information on how to use function handles to define callback functions, seeCallback Definition.

Note

If thePickablePartsproperty is set to'none'or if theHitTestproperty is set to'off', then this callback does not execute.

Creation callback, specified as one of these values:

  • Function handle

  • Cell array containing a function handle and additional arguments

  • Character vector that is a valid MATLAB command or function, which is evaluated in the base workspace (not recommended)

使用这个属性来执行鳕鱼e when you create the object. MATLAB executes the callback after creating the object and setting all of its properties. Setting theCreateFcnproperty on an existing object has no effect. To have an effect, you must specify theCreateFcnproperty during object creation. One way to specify the property during object creation is to set the default property value for the object. SeeDefault Property Valuesfor more information.

If you specify this callback using a function handle, then MATLAB passes two arguments to the callback function when executing the callback:

  • Created object — Access properties of the object from within the callback function. You also can access the object through theCallbackObjectproperty of the root, which can be queried using thegcbofunction.

  • Event data — Empty argument. Replace it with the tilde character (~) in the function definition to indicate that this argument is not used.

For more information on how to use function handles to define callback functions, seeCallback Definition.

删除回调,指定为一个值s:

  • Function handle

  • Cell array containing a function handle and additional arguments

  • Character vector that is a valid MATLAB command or function, which is evaluated in the base workspace (not recommended)

使用这个属性来执行鳕鱼e when you delete the object MATLAB executes the callback before destroying the object so that the callback can access its property values.

If you specify this callback using a function handle, then MATLAB passes two arguments to the callback function when executing the callback:

  • Deleted object — Access properties of the object from within the callback function. You also can access the object through theCallbackObjectproperty of the root, which can be queried using thegcbofunction.

  • Event data — Empty argument. Replace it with the tilde character (~) in the function definition to indicate that this argument is not used.

For more information on how to use function handles to define callback functions, seeCallback Definition.

Callback Execution Control

expand all

Callback queuing specified as'queue'or'cancel'. TheBusyActionproperty determines how MATLAB handles the execution of interrupting callbacks.

Consider these callback states where:

  • Therunningcallback is the currently executing callback.

  • Theinterruptingcallback is a callback that tries to interrupt the running callback.

Whenever MATLAB invokes a callback, that callback attempts to interrupt a running callback. TheInterruptibleproperty of the object owning the running callback determines if interruption is permitted. If interruption is not permitted, then theBusyActionproperty of the object owning the interrupting callback determines if it is discarded or put in the queue.

If a callback of theSurfaceobject tries to interrupt a running callback that cannot be interrupted, then theBusyActionproperty determines if it is discarded or put in the queue. Specify theBusyActionproperty as one of these values:

  • 'queue'— Put the interrupting callback in a queue to be processed after the running callback finishes execution. (default behavior)

  • 'cancel'— Discard the interrupting callback.

Callback interruption, specified as'on'or'off'. TheInterruptibleproperty determines if a running callback can be interrupted.

Note

Consider these callback states where:

  • Therunningcallback is the currently executing callback.

  • Theinterruptingcallback is a callback that tries to interrupt the running callback.

Whenever MATLAB invokes a callback, that callback attempts to interrupt a running callback. TheInterruptibleproperty of the object owning the running callback determines if interruption is permitted. If interruption is not permitted, then theBusyActionproperty of the object owning the interrupting callback determines if it is discarded or put in the queue.

TheInterruptibleproperty determines if another callback can interrupt theButtonDownFcncallback of theSurfaceobject. TheInterruptibleproperty has two values:

  • 'on'— Interruptible. Interruption occurs at the next point where MATLAB processes the queue. For example, when you have a command such asdrawnow,figure,getframe,waitfor, orpause.

    • If the running callback contains one of these commands, then MATLAB stops the execution of the callback at this point and executes the interrupting callback. MATLAB resumes executing the running callback when the interrupting callback completes. For more information, seeInterrupt Callback Execution.

    • If the running callback does not contain one of these commands, then MATLAB finishes executing the callback without interruption.

  • 'off'— Not interruptible. MATLAB finishes executing the running callback without any interruptions.

Ability to capture mouse clicks, specified as one of these values:

  • 'visible'— Capture mouse clicks when visible. TheVisibleproperty must be set to'on'and you must click a part of theSurfaceobject that has a defined color. You cannot click a part that has an associated color property set to'none'. If the plot contains markers, then the entire marker is clickable if either the edge or the fill has a defined color. TheHitTestproperty determines if theSurfaceobject responds to the click or if an ancestor does.

  • 'all'— Capture mouse clicks regardless of visibility. TheVisibleproperty can be set to'on'or'off'and you can click a part of theSurfaceobject that has no color. TheHitTestproperty determines if theSurfaceobject responds to the click or if an ancestor does.

  • 'none'— Cannot capture mouse clicks. Clicking theSurfaceobject passes the click through it to the object below it in the current view of the figure window. TheHitTestproperty has no effect.

Response to captured mouse clicks, specified as one of these values:

  • 'on'— Trigger theButtonDownFcncallback of theSurfaceobject. If you have defined theUIContextMenuproperty, then invoke the context menu.

  • 'off'— Trigger the callbacks for the nearest ancestor of theSurfaceobject that has:

    • HitTestproperty set to'on'

    • PickablePartsproperty set to a value that enables the ancestor to capture mouse clicks.

Note

ThePickablePartsproperty determines if theSurfaceobject can capture mouse clicks. If it cannot, then theHitTestproperty has no effect.

This property is read-only.

Deletion status, returned as'off'or'on'. MATLAB sets theBeingDeletedproperty to'on'when the delete function of the object begins execution (see theDeleteFcnproperty). TheBeingDeletedproperty remains set to'on'until the object no longer exists.

Check the value of theBeingDeletedproperty if you need to verify that the object is not about to be deleted before querying or modifying it.

Parent/Child

expand all

Parent, specified as anAxes,Group, orTransformobject.

Visibility of the object handle in theChildrenproperty of the parent, specified as one of these values:

  • 'on'— Object handle is always visible.

  • 'off'— Object handle is invisible at all times. This option is useful for preventing unintended changes to the UI by another function. Set theHandleVisibilityto'off'to temporarily hide the handle during the execution of that function.

  • 'callback'— Object handle is visible from within callbacks or functions invoked by callbacks, but not from within functions invoked from the command line. This option blocks access to the object at the command line, but permits callback functions to access it.

If the object is not listed in theChildrenproperty of the parent, then functions that obtain object handles by searching the object hierarchy or querying handle properties cannot return it. For example, when you have a function such asget,findobj,gca,gcf,gco,newplot,cla,clf, andclose.

Hidden object handles are still valid. Set the rootShowHiddenHandlesproperty to'on'to list all object handles regardless of theirHandleVisibilityproperty setting.

The object has no children. You cannot set this property.

Identifiers

expand all

Tag to associate with thesurfaceobject, specified as a character vector or string scalar.

Use this property to findsurfaceobjects in a hierarchy. For example, you can use thefindobjfunction to findsurfaceobjects that have a specificTagproperty value.

Example:'January Data'

This property is read-only.

Type of graphics object, returned as'surface'

User data to associate with thesurfaceobject, specified as any MATLAB data, for example, a scalar, vector, matrix, cell array, character array, table, or structure. MATLAB does not use this data.

To associate multiple sets of data or to attach a field name to the data, use thegetappdataandsetappdatafunctions.

Example:1:100

Introduced before R2006a

Was this topic helpful?