thigmophobe {plotrix}R Documentation

thigmophobe

Description

thigmophobe returns the direction (as 1|2|3|4 - see pos= in text) away from the nearest point to each of the points described by x and y.

Usage

 thigmophobe(x,y)

Arguments

x,y Numeric data vectors. Typically the x/y coordinates of plotted points.

Details

Typically used to get the offset to automatically place labels on a scatterplot or similar using thigmophobe.labels to avoid overlapping labels. The name means "one who fears being touched".

Value

A vector of directions away from the point nearest to each point.

Author(s)

Jim Lemon

See Also

thigmophobe.labels

Examples

 x<-rnorm(10)
 y<-rnorm(10)
 thigmophobe(x,y)

[Package plotrix version 1.3-5 Index]