Last data update: 2014.03.03

R: Autoplot method for microbenchmark objects: Prettier graphs...
autoplot.microbenchmarkR Documentation

Autoplot method for microbenchmark objects: Prettier graphs for microbenchmark using ggplot2

Description

Uses ggplot2 to produce a more legible graph of microbenchmark timings

Usage

## S3 method for class 'microbenchmark'
autoplot(object, ..., log = TRUE, y_max = 1.05 *
  max(object$time))

Arguments

object

A microbenchmark object

log

If TRUE the time axis will be on log scale.

y_max

The upper limit of the y axis (defaults to 5 percent more than the maximum value)

...

Ignored

Value

A ggplot2 plot

Author(s)

Ari Friedman, Olaf Mersmann

Examples

library("ggplot2")

tm <- microbenchmark(rchisq(100, 0),
                     rchisq(100, 1),
                     rchisq(100, 2),
                     rchisq(100, 3),
                     rchisq(100, 5), times=1000L)
autoplot(tm)

Results