calc_aesthetics {ggplot2} | R Documentation

## Build data frame

### Description

Build data frome for a plot with given data and ... (dots) arguments

### Usage

    calc_aesthetics(plot, data = plot$data, aesthetics)

### Arguments

`plot` | plot object
`data` | data frame to use
`aesthetics` | extra arguments supplied by user that should be used first

### Details

Depending on the layer, we need to stitch together a data frame using the defaults from plot$defaults and overrides for a given geom.

Arguments in dots are evaluated in the context of `data` so that column names can easily be references.

Also makes sure that it contains all the columns required to correctly place the output into the row+column structure defined by the formula, by using `\expand.grid.df` to add in extra columns if needed.

### Author(s)

Hadley Wickham <h.wickham@gmail.com>

### Examples

[Package ggplot2 version 0.5.5 Index]