Skip to content

text

plot · scripts/plot/appearance/text.m

: h = text (x, y, str)
: h = text (x, y, z, str)
: h = text (…, prop, val, …)
: h = text (prop, val, …)
: h = text (ax, …)

Create text objects in an axes.

x, y (and optionally z) give the data coordinates and str the text: a character array or a cell array of character vectors (one line per element). When the coordinates are vectors one text object per point is created and a column vector of handles is returned; a cell array str with the same number of elements then supplies one string per object. Further property/value pairs, including "Parent", are applied to every object. The text goes into the current axes unless an axes is given.