textxy: Nice placement of labels in a plot

Description Usage Arguments Value Author(s) References See Also Examples

Description

Function textxy calls function text in order to add text to points in a graph. textxy chooses a different position for the text depending on the quadrant. This tends to produces better readable plots, with labels fanning away from the origin.

Usage

1
textxy(X, Y, labs, m = c(0, 0), cex = 0.5, offset = 0.8, ...) 

Arguments

X

x coordinates of a set of points

Y

y coordinates of a set of points

labs

labels to be placed next to the points

m

coordinates of the origin of the plot (default (0,0))

cex

character expansion factor

offset

controls the distance between the label and the point. A value of 0 will plot labels on top of the point. Larger values give larger separation between point and label. The default value is 0.8

...

additiona arguments for function text.

Value

NULL

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

References

Graffelman, J. (2006) A guide to biplot calibration.

See Also

text

Examples

1
2
3
4
x <- rnorm(50)
y <- rnorm(50)
plot(x,y,asp=1)
textxy(x,y,1:50,m=c(mean(x),mean(y)))

Example output

Loading required package: MASS

calibrate documentation built on July 1, 2020, 7:03 p.m.