spread.labels {plotrix}R Documentation

Spread labels for irregularly spaced values

Description

Places labels for irregularly spaced values in a regular staggered order

Usage

 spread.labels(x,y,labels=NULL,offset,bg="white",border=FALSE,...)

Arguments

x,y x and y data values
labels text strings
offset How far away from the data points to place the labels. Defaults to one quarter of the plot span.
bg The color of the background rectangles on which to place the labels.
border Whether to draw a border around the labels.
... additional arguments passed to boxed.labels.

Value

nil

Note

This function is mainly useful when labeling irregularly spaced data points that are "spread out" along one dimension. It places the labels regularly spaced and staggered on the long dimension of the data, drawing lines from each label to the point it describes.

Author(s)

Jim Lemon

See Also

boxed.labels

Examples

 x<-rnorm(10)/10
 y<-sort(rnorm(10))
 plot(x,y,xlim=c(-1,1),type="p")
 nums<-c("one","two","three","four","five","six","seven","eight","nine","ten")
 spread.labels(x,y,nums,0.5)

[Package plotrix version 2.2-7 Index]