Learn R Programming

plotrix (version 1.2-2)

boxed.labels: Place labels in boxes

Description

Places labels in boxes on an existing plot

Usage

boxed.labels(x,y,labels,col="white",border=TRUE,xpad=0.6,ypad=0.6,...)

Arguments

x,y
x and y position of the centers of the labels
col
The color of the rectangles on which the labels are displayed.
labels
Text strings
border
Whether to draw borders around the rectangles.
xpad,ypad
Half the value of the proportion of the rectangles to the extent of the text within.
...
additional arguments passed to text.

Value

  • nil

Details

This function is best for regularly spaced labels where overlapping is not a problem. See thigmophobe.labels for squeezing labels in tight places.

See Also

spread.labels, thigmophobe.labels

Examples

Run this code
x<-rnorm(10)
 y<-rnorm(10)
 plot(x,y,type="p")
 nums<-c("one","two","three","four","five","six","seven","eight","nine","ten")
 boxed.labels(x,y-0.1,nums)

Run the code above in your browser using DataLab