Skip to content

gtext

plot · scripts/plot/appearance/gtext.m

: h = gtext (str)
: h = gtext (str, prop, val, …)

Place text at a position chosen with the mouse.

The function waits for a click in the current figure and creates a text object showing str (a character array or a cell array of strings) at the clicked data point of the axes under the cursor. Property/value pairs are passed on to text. The handle of the text is returned.