plot.cycleRdata {cycleRtools} | R Documentation

## Plot cycling data.

### Description

Generate plots to effectively summarise a cycling dataset.

### Usage

    ## S3 method for class 'cycleRdata'
    plot(x, y = 1:3, xvar = "timer.s", xlab = NULL,
      xlim = NULL, CP = attr(x, "CP"), laps = FALSE, breaks = TRUE, ...)

### Arguments

`x` | a `"cycleRdata"` object produced by `read*()`.
`y` | numeric; plots to be created (see details).
`xvar` | character; name of the column to be plotted as the xvariable.
`xlab` | character; x axis label for bottom plot.
`xlim` | given in terms of `x`.
`CP` | a value for critical power annotation.
`laps` | logical; should laps be seperately coloured?
`breaks` | logical; should plot lines be broken when stationary? Will only show when `xvar` represents time values.
`...` | graphical parameters, and/or arguments to be passed to or from other methods.

### Details

The `y` argument describes plot options such that:

1. plots W' balance (kJ).

2. plots power data (W).

3. plots an elevation profile (m).

These options can be combined to produce a stack of plots as desired.

### Value

a variable number of plots.

### Examples

    ## Not run:
    data(ridedata)

    plot(ridedata, xvar = "timer.min")
    plot(ridedata, xvar = "distance.km")

    ## With only two plots.
    plot(ridedata, y = c(2, 1))

    ## Using xlim, note that title metrics adjust.
    plot(ridedata, xvar = "timer.min", xlim = c(100, 150))

    ## Lap colouring.
    data(intervaldata)
    plot(intervaldata, xvar = "timer.min", laps = TRUE)

    ## End(Not run)

[Package cycleRtools version 1.1.1 Index]