This is a convenience function for producing a viewport with x- and/or y-scales based on numeric values passed to the function.

1 2 |

`xData` |
A numeric vector of data. |

`yData` |
A numeric vector of data. |

`xscale` |
A numeric vector (length 2). |

`yscale` |
A numeric vector (length 2). |

`extension` |
A numeric. If length greater than 1, then first value is used to extend the xscale and second value is used to extend the yscale. |

`...` |
All other arguments will be passed to a call to
the |

If `xscale`

is not specified then the values in `x`

are
used to generate an x-scale based on the range of `x`

, extended
by the proportion specified in `extension`

. Similarly for the
y-scale.

A grid viewport object.

Paul Murrell

`viewport`

and
`plotViewport`

.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.