locateArrowText: locateArrowText

Description Usage Arguments Value Author(s) Examples

View source: R/plotAnnotate.R

Description

generate Arrow and Label positions source code for plotArrowText

Usage

1
locateArrowText(nLabel = 1, digits = 2, ...)

Arguments

nLabel

number of labels to generate

digits

number of digits to round position to

...

further arguments to write.table

Value

string source code to be pasted into plotArrowText command.

Author(s)

Thomas Wutzler

Examples

1
2
3
4
5
6
7
8
9
isInteractiveAllowed <- FALSE
if( isInteractiveAllowed ){
    plot(sin(1:10),type="l")
    tmp <- locateArrowText(2)  # paste the result into the following command (second line) 
    plotArrowText(c("Here is one label.","And another.")
        # this line is pasted from clipboard
        ,X=c(3.48, 7.9),Y=c(0.59, -0.45),x=c(2.53, 6.22),y=c(0.5, -0.06)    
        ,adj=c(1,0))
}

twMisc documentation built on May 2, 2019, 6:11 p.m.