Text Properties (GNU Octave (version 9.4.0))

#### 15.3.3.6 Text Properties ¶

Properties of `text` objects (see text):

#### Categories: ¶

Callback Execution | Creation/Deletion | Display | Mouse Interaction | Object Identification | Object Position | Parent/Children | Text Appearance | Text Box Appearance

#### 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.

#### 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 text has been created. Function is set by using default property on root object, e.g., `set (groot, "defaulttextcreatefcn", 'disp ("text created!")')`.

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

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

  Callback function executed immediately before text is deleted.

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

#### Display ¶

`clipping`: `"off"` | {`"on"`} ¶

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

`visible`: `"off"` | {`"on"`} ¶

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

#### 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 text object.

`hittest`: `"off"` | {`"on"`} ¶

  Specify whether text 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 text will accept mouse clicks. By default, `pickableparts` is `"visible"` and only visible parts of the text 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 text is selected.

`selectionhighlight`: `"off"` | {`"on"`} ¶

  If `selectionhighlight` is `"on"`, then the text’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 `"text"`.

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

  User-defined data to associate with the graphics object.

#### Object Position ¶

`extent` (read-only): four-element vector ¶

  Vector `[x0 y0 width height]` indicating the size and location of the text string.

`horizontalalignment`: `"center"` | {`"left"`} | `"right"` ¶

  Specifies the horizontal location of the point set by the `"position"` property relative to the text.

`position`: three-element vector, def. `[0 0 0]` ¶

  Vector `[X0 Y0 Z0]` where X0, Y0, and Z0 indicate the position of the text anchor as defined by `verticalalignment` and `horizontalalignment`.

`rotation`: scalar, def. `0` ¶

  The angle of rotation for the displayed text, measured in degrees.

`units`: `"centimeters"` | {`"data"`} | `"inches"` | `"normalized"` | `"pixels"` | `"points"` ¶

  Sets the measurement unit or method applied to the `"position"` and `"extent"` properties. The default option `"data"` uses the same units and limits as the data plotted in the figure. The `"normalized"` option applies a unitless 0 to 1 scale to the limits along each axis of the displayed data.

`verticalalignment`: `"baseline"` | `"bottom"` | `"cap"` | {`"middle"`} | `"top"` ¶

  Specifies the vertical location of the point set by the `"position"` property relative to the text. Note that `"top"` and `"bottom"` align to the edge of the text box while `"cap"` and `"baseline"` refer to the edges of the text itself.

#### Parent/Children ¶

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

  text objects have no child objects. `children` is unused.

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

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

`parent`: graphics handle ¶

  Handle of the parent graphics object.

#### Text Appearance ¶

`color`: colorspec, def. `[0 0 0]` ¶

  Color of the text. See colorspec.

`editing`: {`"off"`} | `"on"` ¶

  Interactive text editing is not yet implemented for text objects. `editing` is unused.

`fontangle`: `"italic"` | {`"normal"`} ¶

  Control whether the font is italic or normal.

`fontname`: string, def. `"*"` ¶

  Name of font used for text rendering. When setting this property, the text rendering engine will search for a matching font in your system. If none is found then text is rendered using a default sans serif font (same as the default `"*"` value).

  Programming Note: On systems that don’t use FontConfig natively (all but Linux), the font cache is built when Octave is installed. You will need to run `system ("fc-cache -fv")` manually after installing new fonts.

`fontsize`: scalar, def. `10` ¶

  Size of the font used for text rendering. See fontunits property.

`fontsmoothing`: `"off"` | {`"on"`} ¶

  Control whether anti-aliasing is used when rendering text.

`fontunits`: `"centimeters"` | `"inches"` | `"normalized"` | `"pixels"` | {`"points"`} ¶

  Units used to interpret the `"fontsize"` property.

`fontweight`: `"bold"` | {`"normal"`} ¶

  Control the variant of the base font used for text rendering.

`interpreter`: `"latex"` | `"none"` | {`"tex"`} ¶

  Control the way the `"string"` property is interpreted. See Use of the `"interpreter"` Property.

`string`: string, def. `""` ¶

  The text object string content.

#### Text Box Appearance ¶

`backgroundcolor`: colorspec, def. `"none"` ¶

  Color of the background area. See colorspec.

`edgecolor`: colorspec, def. `"none"` ¶

  Color of the outline of the background area. See colorspec.

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

  Style of the text box outline. See Line Styles.

`linewidth`: scalar, def. `0.5000` ¶

  Width of the text box outline.

`margin`: scalar, def. `3` ¶

  Margins between the borders of the background area and the texts. The value is currently interpreted as pixels, regardless of the `"fontunits"` property.