| MATLAB Functions | Help Desk |
gtext
Mouse placement of text in two-dimensional viewgtext('string')
h = gtext('string')
gtext displays a text string in the current Figure window after you select a location with the mouse.
gtext('string')
waits for you to press a mouse button or keyboard key while the pointer is within a Figure window. Pressing a mouse button or any key places 'string' on the plot at the selected location.
h = gtext('string')
returns a handle to a Text graphics objects after you place 'string' on the plot at the selected location.
As you move the pointer into a Figure window, the pointer becomes a crosshair to indicate that gtext is waiting for you to select a location.
gtext uses the functions ginput and text.
Place a label on the current plot:
gtext('Note this divergence!')
ginput, text