spread.labels {plotrix} | R Documentation |
Places labels for irregularly spaced values in a regular staggered order
spread.labels(x,y,labels=NULL,offset,bg="white",border=FALSE,...)
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 . |
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.
nil
Jim Lemon
boxed.labels
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)