xy.coords {base} | R Documentation |
Extracting Plotting Structures
Description
xy.coords
is used by many function to obtain
x and y coordinates for plotting.
The use of this common mechanism across all R functions
produces a measure of consistency.
plot.default
and lowess
are examples of functions
which use this mechanism.
Usage
xy.coords(x, y, xlab=NULL, ylab=NULL)
Arguments
x , y |
the x and y coordinates of a set of points.
Alternatively, a single argument |
xlab , ylab |
names for the x and y variables to be extracted. |
Value
A list with the components
x |
numeric vector of abscissa values. |
y |
numeric vector of the same length as |
xlab |
|
ylab |
|
Examples
xy.coords(fft(c(1:10)), NULL)
data(cars) ; attach(cars)
xy.coords(dist ~ speed, NULL)$xlab # = "speed"