Surface - Primitive surface appearance and behavior - MATLAB (original) (raw)

Surface Properties

Primitive surface appearance and behavior

Surface properties control the appearance and behavior ofSurface objects. By changing property values, you can modify certain aspects of the surface chart. Use dot notation to query and set properties.

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

Faces

Edges

expand all

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

Markers

expand all

Marker size, specified as a positive value in points, where 1 point = 1/72 of an inch.

Cartesian Coordinate Data

expand all

_x_-coordinate data specified as a matrix that is the same size as ZData or 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 for XData, specified as one of these values:

_y_-coordinate data specified as a matrix that is the same size as ZData or 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 for YData, specified as one of these values:

_z_-coordinate data specified as a matrix.

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

Polar Coordinate Data

expand all

Since R2025a

Angle values, specified as specified as a matrix that is the same size asZData or as a vector of length n, where [m,n] = size(ZData).

This property applies only to polar plots.

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

Since R2025a

Radius values, specified as a matrix that is the same size as ZData or as a vector of length m, where [m,n] = size(ZData).

This property applies only to polar plots.

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

Color and Transparency Data

expand all

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

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

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

Normals

expand all

Data Types: single | double

Data Types: single | double

Lighting

Legend

expand all

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

Interactivity

expand all

Data tip content, specified as a DataTipTemplate object. You can control the content that appears in a data tip by modifying the properties of the underlying DataTipTemplate object. For a list of properties, see DataTipTemplate Properties.

For an example of modifying data tips, see Create Custom Data Tips.

This property applies only to surfaces with pinned data tips.

Note

The DataTipTemplate object is not returned byfindobj or findall, and it is not copied by copyobj.

Callbacks

Callback Execution Control

expand all

This property is read-only.

Parent/Child

expand all

Parent, specified as an Axes, PolarAxes, Group, or Transform object.

Identifiers

expand all

This property is read-only.

Type of graphics object, returned as 'surface'

Object identifier, specified as a character vector or string scalar. You can specify a unique Tag value to serve as an identifier for an object. When you need access to the object elsewhere in your code, you can use the findobj function to search for the object based on the Tag value.

Version History

Introduced before R2006a

expand all

Use the surface function to create surface plots in polar coordinates. You can query or modify the polar coordinate data using the ThetaData and RData properties. You can also set the parent object to a specific PolarAxes object using the Parent property.

Setting or getting UIContextMenu property is not recommended. Instead, use the ContextMenu property, which accepts the same type of input and behaves the same way as theUIContextMenu property.

There are no plans to remove the UIContextMenu property, but it is no longer listed when you call the set, get, orproperties functions on the Surface object.