[ top | up ]

Extracting Plotting Structures

Syntax

plot.xy(x, y, xlab=NULL, ylab=NULL)

Arguments

x,y the coordinates of points in the plot. Alternatively, a single argument x can be be provided. In this case, an attempt is made to interpret the argument in a way suitable for plotting. If the argument is a list containing components x and y, these are used are assumed to define plotting coordinates; if the argument contains a time series, the x values are taken to be time and the y values to be the time series; if the argument is a matrix with two columns, the first is assumed to contain the x values and the second the y values; in any other case, the argument is coerced to a vector and the values plotted against their indices.
xlab,ylab names for the x and y variables to be extracted.

Description

plot.xy 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 and lowess are examples of functions which use this mechanism.