| MATLAB Function Reference | ![]() |
Mouse placement of text in two-dimensional view
Syntax
Description
gtext displays a text string in the current figure window after you select a location with the mouse.
gtext(' 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')
'string' on the plot at the selected location.
h = gtext(' returns the handle to a text graphics object after you place string')
'string' on the plot at the selected location.
Remarks
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.
Examples
Place a label on the current plot:
See Also
Annotating Plots for related functions
| gsvd | guidata | ![]() |