Learn R Programming

precisePlacement (version 0.1.0)

lineLocations: Wrapper Function for convertUnits Focused on Identifying the Locations of the Margin Lines of a Plot

Description

Wrapper Function for convertUnits Focused on Identifying the Locations of the Margin Lines of a Plot

Usage

lineLocations(side, line)

Arguments

side

Integer giving the side of the plot to count lines from.

line

Numeric vector giving margin lines one wishes to find the data coordinates of.

Examples

Run this code
# NOT RUN {
## Illustrate where the lines fall when using mtext:
plot(1:10)
mtext(1:26, line = -(1:26), side = 1, col = 'blue')
x <- lineLocations(1, 0:(-26))
abline(h = x, col = 'red', lty = 2)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab