Learn R Programming

plotrix (version 1.41)

corner.loc: Find corner points and add labels in corners

Description

Finds the coordinates in user parameters of a specified corner of the figure region and/or puts a label there

Usage

corner.loc(x=-1,y=1,xoff=0.05,yoff=0.05)
 corner.label(label=NULL,x=-1,y=1,xoff=0.05,yoff=0.05,...)

Arguments

label
text to plot in the appropriate corner
x
an integer value: -1 for the left side of the plot, 1 for the right side
y
an integer value: -1 for the bottom side of the plot, 1 for the top side
xoff
horizontal offset as a proportion of the total plot size
yoff
vertical offset as a proportion of the total plot size
...
further arguments to the text command for the label

Value

  • corner.loc returns a list of the x and y positions of the corner

Examples

Run this code
plot(1:10,1:10)
 corner.label("A")
 corner.loc(1,1)
 corner.label("B",y=-1,x=1)

Run the code above in your browser using DataLab