Learn R Programming

plotrix (version 2.1-5)

spread.labels: 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

See Also

boxed.labels

Examples

Run this code
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)

Run the code above in your browser using DataLab