

   EExxttrraaccttiinngg PPlloottttiinngg SSttrruuccttuurreess

        xy.coords(x, y, xlab=NULL, ylab=NULL, log=NULL, recycle = FALSE)

   AArrgguummeennttss::

        x,y: the x and y coordinates of a set of points.
             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 plot-
             ting.  If the argument is a formula  `yvar ~
             xvar', `xvar' and `yvar' are used as x and y vari-
             ables; if the argument is a list containing compo-
             nents `x' and `y', these are used are assumed to
             define plotting coordinates; if the argument con-
             tains 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 argu-
             ment is coerced to a vector and the values plotted
             against their indices.

   xlab,ylab: names for the x and y variables to be extracted.

        log: character, `"x"', `"y"' or both, as for `plot'.
             Sets negative values to `NA' and gives a warning.

    recycle: logical; if `TRUE', recyle (`rep') the shorter of
             `x' or `y' if their lengths differ.

   DDeessccrriippttiioonn::

        `xy.coords' is used by many function to obtain x and y
        coordinates for plotting.  The use of this common mech-
        anism across all R functions produces a measure of con-
        sistency.

        `plot.default' and `lowess' are examples of functions
        which use this mechanism.

   VVaalluuee::

        A list with the components

          x: numeric (i.e. `"double"') vector of abscissa val-
             ues.

          y: numeric vector of the same length as `x'.

       xlab: `character(1)' or `NULL', the `label' of `x'.

       ylab: `character(1)' or `NULL', the `label' of `y'.

   EExxaammpplleess::

        xy.coords(fft(c(1:10)), NULL)
        data(cars) ; attach(cars)
        xy.coords(dist ~ speed, NULL)$xlab # = "speed"

        str(xy.coords(1:3, 1:2, recycle=TRUE))
        str(xy.coords(-2:10,NULL, log="y"))
        ##> warning: 3 y values <=0 omitted ..

