powered by
To depict the distances in x and y direction to a point, draw lines and labels.
x
y
trace_value(x, y, digits = 0, annotate = TRUE, lab.x = x, lab.y = y, prefix = "", suffix = "", cex = 0.75, col = "blue", lty = 2, ...)
No return value, called for side effects (plotting).
numeric vector of x coordinates
numeric vector of y coordinates
vector of length one or two, giving the number of digits used for rounding the label of the x and y coordinate.
logical, should the lines get annotated with labels?
character vector of length one. Label of the x coordinate.
character vector of length one. Label of the y coordinate.
vector of length one or two, text printed before the label of the x and y coordinate.
vector of length one or two, text printed after the label of the x and y coordinate.
character expansion factor
colour used for text and lines
line type
other graphical parameters, passed on to lines, points and text.
lines
points
text
This function is vectorised over x and y.
x <- c(-2, 3) curve(sin, -2*pi, 2*pi, xname = "t") trace_value(x, sin(x), digits = c(0, 1))
Run the code above in your browser using DataLab