Description Usage Arguments Details Value Author(s) See Also Examples
Interactively position labels and associated arrows on a plot and return code to reproduce the effect.
1 | labelArrow(txt, pos = 3, ...)
|
txt |
The text of the label. |
pos |
the position of the label with respect to the end of the arrow: values of 1, 2, 3 and 4, mean left of, above and to the right. See |
... |
further graphical parameters. |
When the function is run, it calls locator
to get the position of 2 mouse-clicks on the graphics window. The first determines the position of the label and the arrow tail, the second the position of the arrow head.
Code to reproduce the label and arrow is displayed in the Console; this can be cut-pasted into a script for future use.
Returns invisibly a list with the coordinates of the two points selected.
Mike Meredith
1 2 3 4 5 | ## Not run:
plot(Volume ~ Girth, data=trees)
labelArrow("Largest tree")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.