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
Edges to display, specified as 'both'
, 'row'
, or 'column'
.
Markers
Marker size, specified as a positive value in points, where 1 point = 1/72 of an inch.
Cartesian Coordinate Data
_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:
'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 theXData
property.
_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:
'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 theYData
property.
_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
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
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
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 axesCLim
property, linearly mapping data values to colors.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.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
Normals
Data Types: single
| double
Data Types: single
| double
Lighting
Legend
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
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
This property is read-only.
Parent/Child
Parent, specified as an Axes
, PolarAxes
, Group
, or Transform
object.
Identifiers
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
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.