Statistics Toolbox    
gname

Label plotted points with their case names or case number

Syntax

Description

gname('cases') displays a figure window, displays cross-hairs, and waits for a mouse button or keyboard key to be pressed. Position the cross-hair with the mouse and click once near each point to label that point. Input 'cases' is a string matrix with each row the case name of a data point. You can also click and drag a selection rectangle to label all points within the rectangle. When you are done, press the Enter or Escape key.

gname with no arguments labels each case with its case number.

h = gname('cases',line_handle) returns a vector of handles to the text objects on the plot. Use the scalar line_handle to identify the correct line if there is more than one line object on the plot.

You can use gname to label plots created by the plot, scatter, gscatter, plotmatrix, and gplotmatrix functions.

Example

Let's use the city ratings data sets to find out which cities are the best and worst for education and the arts. We create a graph, call the gname function, and click on the points at the extreme left and at the top.

See Also
gplotmatrix, gscatter, gtext, plot, plotmatrix, scatter


  glmval gplotmatrix