viewport_default {ggplot} | R Documentation

## Default viewports

### Description

Set up named viewports that the other components use.

### Usage

    viewport_default(plot, guides=guides_basic(plot), scales=scales_default(plot))

### Arguments

`plot` | plot object
`guides` | guides grobs
`scales` | scales grobs

### Details

This function sets up a `vpTree` in which all of the components of a plot will be placed. This allows for a clean separation between the generation of plot objects, and their placement, and means none of the components have to know anything about the others.

This function is responsible for the overall layout of the plot, ie where the panels, labels and axes go. In future, I will add more viewport layout functions so that you can have the same layout as, e.g., the trellis default.

### Author(s)

Hadley Wickham <h.wickham@gmail.com>

### Examples

[Package ggplot version 0.2.2 Index]