text
creates text descriptions to data points.
Syntax
text(x, y, txt)
text(x, y, z, txt)
text(... , propertyName, propertyValue)
text(ax, ...)
go = text(...)
Input argument
x - x-coordinates: vector or matrix.
y - y-coordinates: vector or matrix.
z - z-coordinates: vector or matrix.
parent - a scalar graphics object value: parent container, specified as a axes.
text - Text to display: character vector, string scalar, string array or cell array.
propertyName - a scalar string or row vector character.
propertyValue - a value.
Output argument
go - a graphics object: text type.
Description
figure creates figure.
Properties:
BackgroundColor: Color of text box background: RGB triplet.
Children: Children: [].
Color: Text color: RGB triplet, [0 0 0] (default) or hexadecimal color code.
EdgeColor: Color of box outline: RGB triplet.
Extent: Size and location of rectangle that encloses text: four-element vector.
FontAngle: Character slant: 'italic' or 'normal' (default).
FontName: Font name:
FontSize: Font size: scalar value greater than zero.
FontUnits: Font size units: 'inches', 'centimeters', 'normalized', 'pixels' or 'points' (default).
FontWeight: Character thickness: 'bold' or 'normal' (default).
HorizontalAlignment: Horizontal alignment of text with respect to position point: 'center', 'right', 'left' (default).
Interpreter: 'tex' (default) interpreter or 'none'.
LineStyle: Line style of box outline: 'none', '--', ':', '-.' or '-' (default).
LineWidth: Width of box outline: scalar numeric value.
Margin: Space around text within the text box: scalar numeric value.
Parent: Parent: axes object.
Position: Location of text: two-element vector of form [x y] or three-element vector of form [x y z].
Rotation: Text orientation: scalar value in degrees.
String: Text to display: character vector, cell array of character vectors, string array, numeric value or '' (default).
Tag: Object identifier: character vector, string scalar or '' (default).
Type: Type of graphics object: 'text'.
Units: Position and extent units: 'normalized', 'inches', 'centimeters', 'characters', 'points', 'pixels' or 'data' (default).
UserData: User data: array or [] (default).
VerticalAlignment: Vertical alignment of text with respect to position point.
Visible: State of visibility: 'off' or 'on' (default).
CreateFcnCallback (function handle, string or cell) called when object is created. Set this property on an existing component has no effect.
DeleteFcnCallback (function handle, string or cell) called when object is deleted.
BeingDeleted Flag indicating that the object is being deleted.
Some properties are available only for compatibility and have currently no effect on the text.
lists of the supported special characters for the 'tex' interpreter:
Superscript: ^{ } 'text^{superscript}'
Subscript: _{ } 'text_{subscript}'
\alpha
ฮฑ
\upsilon
ฯ
\sim
~
\angle
โ
\phi
ฯ
\leq
โค
\ast
*
\chi
ฯ
\infty
โ
\beta
ฮฒ
\psi
ฯ
\clubsuit
โฃ
\gamma
ฮณ
\omega
ฯ
\diamondsuit
โฆ
\delta
ฮด
\Gamma
ฮ
\heartsuit
โฅ
\epsilon
ฯต
\Delta
ฮ
\spadesuit
โ
\zeta
ฮถ
\Theta
ฮ
\leftrightarrow
โ
\eta
ฮท
\Lambda
ฮ
\leftarrow
โ
\theta
ฮธ
\Xi
ฮ
\Leftarrow
โ
\vartheta
ฯ
\Pi
ฮ
\uparrow
โ
\iota
ฮน
\Sigma
ฮฃ
\rightarrow
โ
\kappa
ฮบ
\Upsilon
ฯ
\Rightarrow
โ
\lambda
ฮป
\Phi
ฮฆ
\downarrow
โ
\mu
ยต
\Psi
ฮจ
\circ
ยบ
\nu
ฮฝ
\Omega
ฮฉ
\pm
ยฑ
\xi
ฮพ
\forall
โ
\geq
โฅ
\pi
ฯ
\exists
โ
\propto
โ
\rho
ฯ
\ni
โ
\partial
โ
\sigma
ฯ
\cong
โ
\bullet
โข
\varsigma
ฯ
\approx
โ
\div
รท
\tau
ฯ
\Re
โ
\neq
โ
\equiv
โก
\oplus
โ
\aleph
โต
\Im
โ
\cup
โช
\wp
โ
\otimes
โ
\subseteq
โ
\oslash
โ
\cap
โฉ
\in
โ
\supseteq
โ
\supset
โ
\lceil
โ
\subset
โ
\int
โซ
\cdot
ยท
\o
ฮฟ
\rfloor
โ
\neg
ยฌ
\nabla
โ
\lfloor
โ
\times
x
\ldots
...
\perp
โฅ
\surd
โ
\prime
ยด
\wedge
โง
\varpi
ฯ
\0
โ
\rceil
โ
\rangle
ใ
\mid
|
\vee
โจ
\langle
ใ
\copyright
ยฉ
Examples
See also
History
1.0.0
initial version
1.7.0
CreateFcn, DeleteFcn callback added.
--
BeingDeleted property added.
Author
Allan CORNET
Last updated
Was this helpful?