Learn R Programming

esvis (version 0.2.0)

seg_match: Match segments on a plot

Description

Given an x and y coordinate, this function will produce segments that extend from -1 to the corresponding xy intersection, with a point at the intersection.

Usage

seg_match(x, y, ...)

Arguments

x

The x-coordinate.

y

The y-coordinate.

...

Additional parameters passed to segments. Note that whatever parameters are passed here are also passed to points (e.g., col).

Examples

Run this code
# NOT RUN {
plot(1:10, (1:10)^2, type = "l")
seg_match(3, 9)
seg_match(c(6, 8), c(36, 64), 
	col = c("blue", "green"),
	pch = 21, 
	bg = c("blue", "green"), 
	lty = 3)
# }

Run the code above in your browser using DataLab