15.3.3.8 Patch Properties

Properties of patch objects (see patch):

Categories:

Callback Execution | Color and Transparency | Coordinate Data | Creation/Deletion | Display | Legend Options | Lighting | Marker Appearance | Mouse Interaction | Object Identification | Outline Appearance | Parent/Children

Callback Execution

busyaction: "cancel" | {"queue"}

Define how Octave handles the execution of this object’s callback properties when it is unable to interrupt another object’s executing callback. This is only relevant when the currently executing callback object has its interruptible property set to "off". The busyaction property of the interrupting callback object indicates whether the interrupting callback is queued ("queue" (default)) or discarded ("cancel"). See Callbacks section.

interruptible: "off" | {"on"}

Specify whether this object’s callback functions may be interrupted by other callbacks. By default interruptible is "on" and callbacks that make use of drawnow, figure, waitfor, getframe or pause functions are eventually interrupted. See Callbacks section.

Color and Transparency

alphadatamapping: "direct" | "none" | {"scaled"}

Transparency is not yet implemented for patch objects. alphadatamapping is unused.

cdata: scalar | matrix | array, def. [](0x0)

Data defining the patch object color relative to its x/y/z-coordinate data. Patch color can be defined using indices into the current colormap or as RGB triplets, where the RGB colors are defined along the third dimension. These colors can be separately defined for the entire patch object, for individual faces, or for individual vertices, and is determined by the shape of "cdata" as follows:

If "cdata" is a scalar index into the current colormap or a 1-by-1-by-3 RGB triplet, it defines the color of all faces and edges.

If the patch object has N faces, and "cdata" is a 1-by-N vector of colormap indices or a 1-by-N-by-3 RGB array, it defines the color of each face.

If the patch object has N faces and M vertices per face, and cdata is a M-by-N matrix of colormap indices or a M-by-N-by-3 RGB array, it defines the color at each vertex. (The shape of "cdata" should match that of "xdata", "ydata", and "zdata".)

cdatamapping: "direct" | {"scaled"}

Sets the method for mapping data from the "cdata" or "cdata" property to the current colormap. "Direct" mapping selects the color using the "cdata" or "facevertexcdata" value as an index to the current colormap. "Scaled" mapping scales the "cdata" or "facevertexcdata" values to the range specified in the "clim" axes property.

facealpha: scalar | "flat" | "interp", def. 1

Transparency level of the faces of the patch object. Only double values are supported at present where a value of 0 means complete transparency and a value of 1 means solid faces without transparency. Setting the property to "flat" or "interp" causes the faces to not being rendered. Additionally, the faces are not sorted from back to front which might lead to unexpected results when rendering layered transparent faces.

facecolor: {colorspec} | "none" | "flat" | "interp", def. [0 0 0]

Color of the faces of the patch object, specified as either a valid color specification or one of "none", "flat", or "interp". "flat" and "interp" will set either a single color for each face or a color interpolated across the face’s vertices using the color value data stored in either the "cdata" or "facevertexcdata" properties. See colorspec.

facelighting: {"flat"} | "gouraud" | "none" | "phong"

When set to a value other than "none", the faces of the object are drawn with light and shadow effects. Supported values are "none" (no lighting effects), "flat" (faceted look), and "gouraud" (linear interpolation of the lighting effects between the vertices). "phong" is deprecated and has the same effect as "gouraud".

facevertexalphadata: def. [](0x0)

Face-Vertex transparency control is not yet implemented for patch objects. facevertexalphadata is unused.

facevertexcdata: scalar | matrix, def. [](0x0)

Data defining the patch object color relative to its face-vertex data. Patch color can be defined using indices into the current colormap or as RGB triplets, where the RGB colors are defined in the rows of "facevertexcdata". These colors can be separately defined for the entire patch object, for individual faces, or for individual vertices, and is determined by the shape of "facevertexcdata" as follows:

If facevertexcdata is a scalar index into the current colormap or a 1-by-3 RGB triplet, it defines the color of all faces and edges.

If the patch object has N faces, and facevertexcdata is a N-by-1 column vector of indices or a N-by-3 RGB matrix, it defines the color of each one of the N faces.

If the patch object has M vertices, and facevertexcdata is a M-by-1 column vector of indices or a M-by-3 RGB matrix, it defines the color at each vertex.

Coordinate Data

faces: vector | matrix, def. [1 2 3]

patch faces connectivity list stored as an M x N matrix, with each of the M faces defined by a row of up to N vertices, and each element contains the row index of a vertex stored in the vertices property. Faces with fewer than N vertices use NaN values to fill empty row elements.

vertices: vector | matrix, def. 3-by-2 double

patch vertex list stored as an N x 3 matrix, with each row containing the x, y, and z coordinates of the vector, and used with the faces property to define patch structure.

xdata: vector | matrix, def. [0; 1; 0]

patch vertex x-coordinates.

ydata: vector | matrix, def. [1; 1; 0]

patch vertex y-coordinates.

zdata: vector | matrix, def. [](0x0)

patch vertex z-coordinates.

Creation/Deletion

beingdeleted: {"off"} | "on"

Property indicating that a function has initiated deletion of the object. beingdeleted is set to true until the object no longer exists.

createfcn: string | function handle, def. [](0x0)

Callback function executed immediately after patch has been created. Function is set by using default property on root object, e.g., set (groot, "defaultpatchcreatefcn", 'disp ("patch created!")').

For information on how to write graphics listener functions see Callbacks section.

deletefcn: string | function handle, def. [](0x0)

Callback function executed immediately before patch is deleted.

For information on how to write graphics listener functions see Callbacks section.

Display

clipping: "off" | {"on"}

If clipping is "on", the patch is clipped in its parent axes limits.

visible: "off" | {"on"}

If visible is "off", the patch is not rendered on screen.

Legend Options

displayname: def. ""

Text of the legend entry corresponding to this patch.

Lighting

ambientstrength: scalar, def. 0.3000

Strength of the ambient light. Value between 0.0 and 1.0.

backfacelighting: "lit" | {"reverselit"} | "unlit"

"lit": The normals are used as is for lighting. "reverselit": The normals are always oriented towards the point of view. "unlit": Faces with normals pointing away from the point of view are unlit.

diffusestrength: scalar, def. 0.6000

Strength of the diffuse reflection. Value between 0.0 (no diffuse reflection) and 1.0 (full diffuse reflection).

facenormals: def. [](0x0)

Face normals are used for lighting the edges or faces if the edgelighting or facelighting properties are set to "flat". Setting facenormals also forces the facenormalsmode property to be set to "manual".

facenormalsmode: {"auto"} | "manual"

If this property is set to "auto", facenormals are automatically calculated if the edgelighting or facelighting property are set to "flat" and at least one light object is present and visible in the same axes.

specularcolorreflectance: scalar, def. 1

Reflectance for specular color. Value between 0.0 (color of underlying face) and 1.0 (color of light source).

specularexponent: scalar, def. 10

Exponent for the specular reflection. The lower the value, the more the reflection is spread out.

specularstrength: scalar, def. 0.9000

Strength of the specular reflection. Value between 0.0 (no specular reflection) and 1.0 (full specular reflection).

vertexnormals: def. [](0x0)

Vertex normals are used for lighting the edges or faces if the edgelighting or facelighting properties are set to "gouraud". Setting vertexnormals also forces the vertexnormalsmode property to be set to "manual".

vertexnormalsmode: {"auto"} | "manual"

If this property is set to "auto", vertexnormals are automatically calculated if the edgelighting or facelighting property are set to "gouraud" and at least one light object is present and visible in the same axes.

Marker Appearance

marker: "*" | "+" | "." | "<" | ">" | "^" | "_" | "d" | "diamond" | "h" | "hexagram" | {"none"} | "o" | "p" | "pentagram" | "s" | "square" | "v" | "x" | "|"

See line marker property.

markeredgecolor: {"auto"} | "flat" | "none"

See line markeredgecolor property.

markerfacecolor: "auto" | "flat" | {"none"}

See line markerfacecolor property.

markersize: scalar, def. 6

See line markersize property.

Mouse Interaction

buttondownfcn: string | function handle, def. [](0x0)

For information on how to write graphics listener functions see Callbacks section.

contextmenu: graphics handle, def. [](0x0)

Graphics handle of the uicontextmenu object that is currently associated to this patch object.

hittest: "off" | {"on"}

Specify whether patch processes mouse events or passes them to ancestors of the object. When enabled, the object may respond to mouse clicks by evaluating the "buttondownfcn", showing the uicontextmenu, and eventually becoming the root "currentobject". This property is only relevant when the object can accept mouse clicks which is determined by the "pickableparts" property. See pickableparts property.

pickableparts: "all" | "none" | {"visible"}

Specify whether patch will accept mouse clicks. By default, pickableparts is "visible" and only visible parts of the patch or its children may react to mouse clicks. When pickableparts is "all" both visible and invisible parts (or children) may react to mouse clicks. When pickableparts is "none" mouse clicks on the object are ignored and transmitted to any objects underneath this one. When an object is configured to accept mouse clicks the "hittest" property will determine how they are processed. See hittest property.

selected: {"off"} | "on"

Property indicates whether this patch is selected.

selectionhighlight: "off" | {"on"}

If selectionhighlight is "on", then the patch’s selection state is visually highlighted.

Object Identification

tag: string, def. ""

A user-defined string to label the graphics object.

type (read-only): string

Class name of the graphics object. type is always "patch".

userdata: Any Octave data, def. [](0x0)

User-defined data to associate with the graphics object.

Outline Appearance

edgealpha: scalar | matrix, def. 1

Transparency is not yet implemented for patch objects. edgealpha is unused.

edgecolor: colorspec | "none" | "flat" | "interp", def. [0 0 0]

Color of the edges of the patch object, specified as either a valid color specification or one of "none", "flat", or "interp". "flat" and "interp" will set either a single color for each edge or a color interpolated between edge’s vertices using the color value data stored in "cdata". See colorspec.

edgelighting: "flat" | "gouraud" | {"none"} | "phong"

When set to a value other than "none", the edges of the object are drawn with light and shadow effects. Supported values are "none" (no lighting effects), "flat" (faceted look), and "gouraud" (linear interpolation of the lighting effects between the vertices). "phong" is deprecated and has the same effect as "gouraud".

linestyle: {"-"} | "--" | "-." | ":" | "none"

See Line Styles.

linewidth: scalar, def. 0.5000

See line linewidth property.

Parent/Children

children (read-only): vector of graphics handles, def. [](0x1)

Child objects for Patch objects is not yet implemented for patch objects. children is unused.

handlevisibility: "callback" | "off" | {"on"}

If handlevisibility is "off", the patch’s handle is not visible in its parent’s "children" property.

parent: graphics handle

Handle of the parent graphics object.