⇤ ← Revision 1 as of 2008-01-18 17:06:08
Size: 201
Comment:
|
Size: 609
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 8: | Line 8: |
The < identify > function enables to click on a scatterplot and thus identify its points interactively. {{{ # let's generate the x and y vectors x.nv <- c (1, 2, 3, 4, 2, 3) y.nv <- c (4, 2, 1, 4, 1, 5) # let's plot them plot (x = x.nv, y = y.nv, xlab = "x", ylab = "y") # let's use identify identify (x = x.nv, y = y.nv) # output: the point closest to the mouse click coordinates }}} |
Interacting with a scatterplot: the Identify function
The < identify > function enables to click on a scatterplot and thus identify its points interactively.
# let's generate the x and y vectors x.nv <- c (1, 2, 3, 4, 2, 3) y.nv <- c (4, 2, 1, 4, 1, 5) # let's plot them plot (x = x.nv, y = y.nv, xlab = "x", ylab = "y") # let's use identify identify (x = x.nv, y = y.nv) # output: the point closest to the mouse click coordinates