trace_value: Draw Paths to Points perpendicular to Coordinate Axis

View source: R/5extreme.R

trace_valueR Documentation

Draw Paths to Points perpendicular to Coordinate Axis

Description

To depict the distances in x and y direction to a point, draw lines and labels.

Usage

trace_value(x, y, digits = 0, annotate = TRUE, lab.x = x, lab.y = y, prefix = "",
            suffix = "", cex = 0.75, col = "blue", lty = 2, ...)

Arguments

x

numeric vector of x coordinates

y

numeric vector of y coordinates

digits

vector of length one or two, giving the number of digits used for rounding the label of the x and y coordinate.

annotate

logical, should the lines get annotated with labels?

lab.x

character vector of length one. Label of the x coordinate.

lab.y

character vector of length one. Label of the y coordinate.

prefix

vector of length one or two, text printed before the label of the x and y coordinate.

suffix

vector of length one or two, text printed after the label of the x and y coordinate.

cex

character expansion factor

col

colour used for text and lines

lty

line type

...

other graphical parameters, passed on to lines, points and text.

Details

This function is vectorised over x and y.

Value

No return value, called for side effects (plotting).

Examples

x <- c(-2, 3)
curve(sin, -2*pi, 2*pi, xname = "t")
trace_value(x, sin(x), digits = c(0, 1))

lfstat documentation built on Nov. 10, 2022, 5:42 p.m.